transport_data.config.Config¶
- class transport_data.config.Config(cache_path: ~pathlib._local.Path = <factory>, config_path: ~pathlib._local.Path | None = None, data_path: ~pathlib._local.Path = <factory>, registry_remote_url: str = 'https://github.com/transport-data/registry.git', store_map: dict = <factory>)[source]¶
Bases:
object
Common configuration.
- __init__(cache_path: ~pathlib._local.Path = <factory>, config_path: ~pathlib._local.Path | None = None, data_path: ~pathlib._local.Path = <factory>, registry_remote_url: str = 'https://github.com/transport-data/registry.git', store_map: dict = <factory>) None ¶
Methods
__init__
([cache_path, config_path, ...])read
()Read configuration from file, returning a new instance.
write
()Write configuration to file.
Attributes
Path to the configuration file read, if any.
Git remote URL for the TDC SDMX registry.
Path for local cache.
Path for local data.
Mapping from maintainer IDs to either "local" (stored in a
LocalStore
) or "registry" (stored in theRegistry
).- cache_path: Path¶
Path for local cache.
- data_path: Path¶
Path for local data. See Formats and layout for details.
- classmethod read()¶
Read configuration from file, returning a new instance.
- registry_remote_url: str = 'https://github.com/transport-data/registry.git'¶
Git remote URL for the TDC SDMX registry.
Users with SSH keys registered on github.com may wish to use instead
git@github.com:transport-data/registry.git
.
- store_map: dict¶
Mapping from maintainer IDs to either “local” (stored in a
LocalStore
) or “registry” (stored in theRegistry
).
- write()¶
Write configuration to file.