path#
Standardized path generation for openplaces data files.
Classes#
Reference for openplaces files and directories. |
Functions#
|
Shortcut for |
Module Contents#
- class openplaces.path.OpenPlacesReference(admin_id: str | openplaces.core.schema.AdminId = None, entity: str | openplaces.core.schema.Entity = None, dataset: str | openplaces.core.schema.DataSet = None, filename: str = None, root: str | pathlib.Path = cfg.core_dir, by_admin: bool = True, use_prefix: bool = True, as_dir: bool = None)#
Reference for openplaces files and directories.
Combines admin_id, entity, dataset, filename, and root directory.
- to_path(default_extension='parquet', as_dir=None) pathlib.Path#
Build complete path with directory structure and filename.
- Parameters:
default_extension (str) – Is ‘parquet’ by default. Set to None to suppress extension.
as_dir (bool) – If True, return directory path.
- openplaces.path.path(*args, default_extension='parquet', **kwargs)#
Shortcut for
OpenPlacesReference(*args, **kwargs).to_path().