flexmeasures.cli.data_show

CLI commands for listing database contents and classes

Functions

flexmeasures.cli.data_show.find_duplicates(_list: list, attr: str | None = None) → list

Find duplicates in a list, optionally based on a specified attribute.

Parameters:
  • _list – The input list to search for duplicates.

  • attr – The attribute name to consider when identifying duplicates. If None, the function will check for duplicates based on the elements themselves.

Returns:

A list containing the duplicate elements found in the input list.

flexmeasures.cli.data_show.get_export_timezone(timezone: str | None, filepath: str | None, sensors: list[Sensor]) → str

Find the timezone to export beliefs in, warning when one was given without a file to export to.

Parameters:
  • timezone – The timezone given with –export-timezone, if any.

  • filepath – The file given with –to-file, if any.

  • sensors – The sensors with data, the first of which gives the default timezone.

Returns:

The given timezone, or else the timezone of the first sensor.

flexmeasures.cli.data_show.list_data_generators(generator_type: str)

Show available data generators of a specific type.