File Formats

File format type definitions for model data files.

This module provides lightweight type markers for different file formats used in model data processing. These types enable single dispatch patterns for format-specific file reading and processing logic.

class r2x_core.file_types.FileFormat[source]

Lightweight base class for file format types.

This is a minimal sentinel class designed to work with singledispatch. Subclasses act as type markers for dispatch without storing instance data.

supports_timeseries

Whether this file format can store time series data. Default is False.

Type:

bool

class r2x_core.file_types.TableFormat[source]

Tabular data format (CSV, TSV, etc.).

Supports time series data storage.

class r2x_core.file_types.H5Format[source]

HDF5 data format.

Supports time series data storage with hierarchical organization. Use reader_kwargs to configure how the file is read.

class r2x_core.file_types.ParquetFormat[source]

Apache Parquet data format.

Supports time series data storage with columnar compression.

class r2x_core.file_types.JSONFormat[source]

JSON data format.

Does not support time series (typically used for component definitions).

class r2x_core.file_types.XMLFormat[source]

XML data format.

Does not support time series (typically used for hierarchical component data).