archivebox.config.constants

Constants are for things that never change at runtime. (but they can change from run-to-run or machine-to-machine)

DATA_DIR will never change at runtime, but you can run archivebox from inside a different DATA_DIR on the same machine.

This is loaded very early in the archivebox startup flow, so nothing in this file or imported from this file should import anything from archivebox.config.common, django, other INSTALLED_APPS, or anything else that is not in a standard library.

Module Contents

Classes

ConstantsDict

Data

CONSTANTS

CONSTANTS_CONFIG

API

class archivebox.config.constants.ConstantsDict[source]

Bases: collections.abc.Mapping

PACKAGE_DIR: pathlib.Path[source]

None

DATA_DIR: pathlib.Path[source]

None

ARCHIVE_DIR: pathlib.Path[source]

None

MACHINE_TYPE: str[source]

‘get_machine_type(…)’

MACHINE_ID: str[source]

‘get_machine_id(…)’

COLLECTION_ID: str[source]

‘get_collection_id(…)’

VERSION: str[source]

‘detect_installed_version(…)’

IN_DOCKER: bool[source]

None

IS_ROOT: bool[source]

None

ARCHIVEBOX_USER: int[source]

None

ARCHIVEBOX_GROUP: int[source]

None

RUNNING_AS_UID: int[source]

None

RUNNING_AS_GID: int[source]

None

DEFAULT_PUID: int[source]

None

DEFAULT_PGID: int[source]

None

IS_INSIDE_VENV: bool[source]

None

PACKAGE_DIR_NAME: str[source]

None

TEMPLATES_DIR_NAME: str[source]

‘templates’

TEMPLATES_DIR: pathlib.Path[source]

None

STATIC_DIR_NAME: str[source]

‘static’

STATIC_DIR: pathlib.Path[source]

None

ARCHIVE_DIR_NAME: str[source]

‘archive’

SOURCES_DIR_NAME: str[source]

‘sources’

PERSONAS_DIR_NAME: str[source]

‘personas’

CRONTABS_DIR_NAME: str[source]

‘crontabs’

CACHE_DIR_NAME: str[source]

‘cache’

LOGS_DIR_NAME: str[source]

‘logs’

USER_PLUGINS_DIR_NAME: str[source]

‘user_plugins’

CUSTOM_TEMPLATES_DIR_NAME: str[source]

‘user_templates’

SOURCES_DIR: pathlib.Path[source]

None

PERSONAS_DIR: pathlib.Path[source]

None

LOGS_DIR: pathlib.Path[source]

None

CACHE_DIR: pathlib.Path[source]

None

CUSTOM_TEMPLATES_DIR: pathlib.Path[source]

None

USER_PLUGINS_DIR: pathlib.Path[source]

None

CONFIG_FILENAME: str[source]

‘ArchiveBox.conf’

SQL_INDEX_FILENAME: str[source]

‘index.sqlite3’

QUEUE_DATABASE_FILENAME: str[source]

‘queue.sqlite3’

CONFIG_FILE: pathlib.Path[source]

None

DATABASE_FILE: pathlib.Path[source]

None

QUEUE_DATABASE_FILE: pathlib.Path[source]

None

JSON_INDEX_FILENAME: str[source]

‘index.json’

HTML_INDEX_FILENAME: str[source]

‘index.html’

ROBOTS_TXT_FILENAME: str[source]

‘robots.txt’

FAVICON_FILENAME: str[source]

‘favicon.ico’

TMP_DIR_NAME: str[source]

‘tmp’

DEFAULT_TMP_DIR: pathlib.Path[source]

None

LIB_DIR_NAME: str[source]

‘lib’

DEFAULT_LIB_DIR: pathlib.Path[source]

None

TIMEZONE: str[source]

‘UTC’

DEFAULT_CLI_COLORS: Dict[str, str][source]

None

DISABLED_CLI_COLORS: Dict[str, str][source]

‘benedict(…)’

ALLOWDENYLIST_REGEX_FLAGS: int[source]

None

STATICFILE_EXTENSIONS: frozenset[str][source]

‘frozenset(…)’

‘frozenset(…)’

‘frozenset(…)’

ALLOWED_IN_DATA_DIR: frozenset[str][source]

‘frozenset(…)’

classmethod __getitem__(key: str)[source]
classmethod __benedict__()[source]
classmethod __len__()[source]
classmethod __iter__()[source]
archivebox.config.constants.CONSTANTS[source]

‘ConstantsDict(…)’

archivebox.config.constants.CONSTANTS_CONFIG[source]

benedict(…)’