archivebox.config.paths
Module Contents
Functions
Get a short, stable, unique ID for the current collection (e.g. abc45678) |
|
Get a short, stable, unique ID for the current machine (e.g. abc45678) |
|
Get a short, stable, unique type identifier for the current machine (e.g. linux-x86_64-docker) |
|
Check if a given directory is writable by a specific user and group (fallback=try as current user is unable to check with provided uid) |
|
Check if a given directory can contain unix sockets (e.g. /tmp/supervisord.sock) |
|
Create a required runtime dir and fix only that dir’s ownership when needed. |
|
Data
API
- archivebox.config.paths.get_collection_id(DATA_DIR=DATA_DIR) str[source]
Get a short, stable, unique ID for the current collection (e.g. abc45678)
- archivebox.config.paths.get_machine_id() str[source]
Get a short, stable, unique ID for the current machine (e.g. abc45678)
- archivebox.config.paths.get_machine_type() str[source]
Get a short, stable, unique type identifier for the current machine (e.g. linux-x86_64-docker)
- archivebox.config.paths.dir_is_writable(dir_path: pathlib.Path, uid: int | None = None, gid: int | None = None, fallback=True, chown=True) bool[source]
Check if a given directory is writable by a specific user and group (fallback=try as current user is unable to check with provided uid)
- archivebox.config.paths.assert_dir_can_contain_unix_sockets(dir_path: pathlib.Path) bool[source]
Check if a given directory can contain unix sockets (e.g. /tmp/supervisord.sock)
- archivebox.config.paths.create_and_chown_dir(dir_path: pathlib.Path) None[source]
Create a required runtime dir and fix only that dir’s ownership when needed.
- archivebox.config.paths.get_or_create_working_tmp_dir(autofix=True, quiet=True, config: ArchiveBoxConfig | None = None, **config_kwargs)[source]
- archivebox.config.paths.get_or_create_working_lib_dir(autofix=True, quiet=False, config: ArchiveBoxConfig | None = None, **config_kwargs)[source]
- archivebox.config.paths.get_data_locations(config: ArchiveBoxConfig | None = None, **config_kwargs)[source]
- archivebox.config.paths.get_code_locations(config: ArchiveBoxConfig | None = None, **config_kwargs)[source]