fastoad.io.formatter module

class fastoad.io.formatter.IVariableIOFormatter[source]

Bases: ABC

Interface for formatter classes to be used in VariableIO class.

The file format is defined by the implementation of this interface.

abstract read_variables(data_source: Union[str, IO]) VariableList[source]

Reads variables from provided data source file.

Parameters

data_source

Returns

a list of Variable instance

abstract write_variables(data_source: Union[str, IO], variables: VariableList)[source]

Writes variables to defined data source file.

Parameters
  • data_source

  • variables