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)

Data

__package__

PACKAGE_DIR

DATA_DIR

ARCHIVE_DIR

IN_DOCKER

DATABASE_FILE

API

archivebox.config.paths.__package__

‘archivebox.config’

archivebox.config.paths.PACKAGE_DIR: pathlib.Path

None

archivebox.config.paths.DATA_DIR: pathlib.Path

‘resolve(…)’

archivebox.config.paths.ARCHIVE_DIR: pathlib.Path

None

archivebox.config.paths.IN_DOCKER

None

archivebox.config.paths.DATABASE_FILE

None

archivebox.config.paths._get_collection_id(DATA_DIR=DATA_DIR, force_create=False) str
archivebox.config.paths.get_collection_id(DATA_DIR=DATA_DIR) str

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

archivebox.config.paths.get_machine_id() str

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

archivebox.config.paths.get_machine_type() str

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) bool

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)