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

config_path

Path to the configuration file read, if any.

registry_remote_url

Git remote URL for the TDC SDMX registry.

cache_path

Path for local cache.

data_path

Path for local data.

store_map

Mapping from maintainer IDs to either "local" (stored in a LocalStore) or "registry" (stored in the Registry).

cache_path: Path

Path for local cache.

config_path: Path | None = None

Path to the configuration file read, if any.

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 the Registry).

write()

Write configuration to file.