pyHarm.Exporter¶
Classes¶
Base class for protocol classes. |
|
Functions¶
|
Module Contents¶
- pyHarm.Exporter._create_results_folder(base_path='.', date_time_option: bool = False) str¶
- class pyHarm.Exporter.Exportable¶
Bases:
ProtocolBase class for protocol classes.
Protocol classes are defined as:
class Proto(Protocol): def meth(self) -> int: ...
Such classes are primarily used with static type checkers that recognize structural subtyping (static duck-typing).
For example:
class C: def meth(self) -> int: return 0 def func(x: Proto) -> int: return x.meth() func(C()) # Passes static type check
See PEP 544 for details. Protocol classes decorated with @typing.runtime_checkable act as simple-minded runtime protocols that check only the presence of given attributes, ignoring their type signatures. Protocol classes can be generic, they are defined as:
class GenProto(Protocol[T]): def meth(self) -> T: ...
- export(export_path: str, prefix: str, *args, **kwargs) None¶
Exports data to a specified file path.
- Parameters:
data – The data to be exported.
file_path – The path to the file where the data will be exported.
**kwargs – Additional keyword arguments that might be needed for specific exporters.
- class pyHarm.Exporter.Exporter(export_path: str, status: bool = False, date_time_option: bool = False, **kwargs)¶
- status = False¶
- export(DE: dict[str:Exportable], logger: logging.Logger) None¶
Exports data to a specified file path.
- Parameters:
data – The data to be exported.
file_path – The path to the file where the data will be exported.
**kwargs – Additional keyword arguments that might be needed for specific exporters.