archivebox.config.paths

Module Contents

Functions

_get_collection_id

get_collection_id

Get a short, stable, unique ID for the current collection (e.g. abc45678)

get_machine_id

Get a short, stable, unique ID for the current machine (e.g. abc45678)

get_machine_type

Get a short, stable, unique type identifier for the current machine (e.g. linux-x86_64-docker)

dir_is_writable

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)

assert_dir_can_contain_unix_sockets

Check if a given directory can contain unix sockets (e.g. /tmp/supervisord.sock)

create_and_chown_dir

get_or_create_working_tmp_dir

get_or_create_working_lib_dir

get_data_locations

get_code_locations

Data

PACKAGE_DIR

DATA_DIR

ARCHIVE_DIR

IN_DOCKER

DATABASE_FILE

API

archivebox.config.paths.PACKAGE_DIR: pathlib.Path[source]

None

archivebox.config.paths.DATA_DIR: pathlib.Path[source]

‘resolve(…)’

archivebox.config.paths.ARCHIVE_DIR: pathlib.Path[source]

None

archivebox.config.paths.IN_DOCKER[source]

None

archivebox.config.paths.DATABASE_FILE[source]

None

archivebox.config.paths._get_collection_id(DATA_DIR=DATA_DIR, force_create=False) str[source]
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]
archivebox.config.paths.get_or_create_working_tmp_dir(autofix=True, quiet=True)[source]
archivebox.config.paths.get_or_create_working_lib_dir(autofix=True, quiet=False)[source]
archivebox.config.paths.get_data_locations()[source]
archivebox.config.paths.get_code_locations()[source]