archivebox.cli

Submodules

Package Contents

Classes

LazySubcommands

NotProvided

Functions

wait_for_bg_threads_to_exit

Block until the specified threads exit. e.g. pass thread_names=(‘default_hook_handler’,) to wait for webhooks. Useful for waiting for signal handlers, webhooks, etc. to finish running after a mgmt command completes.

run_subcommand

Run a given ArchiveBox subcommand with the given list of args

main

Data

__command__

BUILTIN_LIST

CLI_DIR

SUBCOMMAND_MODULES

required_attrs

is_cli_module

is_valid_cli_module

CLI_SUBCOMMANDS

meta_cmds

setup_cmds

archive_cmds

fake_db

display_first

IGNORED_BG_THREADS

Omitted

OMITTED

API

archivebox.cli.__command__[source]

‘archivebox’

archivebox.cli.BUILTIN_LIST[source]

None

archivebox.cli.CLI_DIR[source]

None

archivebox.cli.SUBCOMMAND_MODULES[source]

None

archivebox.cli.required_attrs[source]

(’package’, ‘command’, ‘main’)

archivebox.cli.is_cli_module[source]

None

archivebox.cli.is_valid_cli_module[source]

None

class archivebox.cli.LazySubcommands[source]

Bases: collections.abc.Mapping

keys()[source]
values()[source]
items()[source]
__getitem__(key)[source]
__iter__()[source]
__len__()[source]
archivebox.cli.CLI_SUBCOMMANDS[source]

‘LazySubcommands(…)’

archivebox.cli.meta_cmds[source]

(‘help’, ‘version’)

archivebox.cli.setup_cmds[source]

(‘init’, ‘setup’, ‘install’)

archivebox.cli.archive_cmds[source]

(‘add’, ‘remove’, ‘update’, ‘list’, ‘status’, ‘schedule’, ‘server’, ‘shell’, ‘manage’)

archivebox.cli.fake_db[source]

(‘oneshot’,)

archivebox.cli.display_first[source]

()

archivebox.cli.IGNORED_BG_THREADS[source]

(‘MainThread’, ‘ThreadPoolExecutor’, ‘IPythonHistorySavingThread’, ‘Scheduler’)

archivebox.cli.wait_for_bg_threads_to_exit(thread_names: Iterable[str] = (), ignore_names: Iterable[str] = IGNORED_BG_THREADS, timeout: int = 60) int[source]

Block until the specified threads exit. e.g. pass thread_names=(‘default_hook_handler’,) to wait for webhooks. Useful for waiting for signal handlers, webhooks, etc. to finish running after a mgmt command completes.

archivebox.cli.run_subcommand(subcommand: str, subcommand_args: List[str] | None = None, stdin: Optional[IO] = None, pwd: Union[pathlib.Path, str, None] = None) None[source]

Run a given ArchiveBox subcommand with the given list of args

class archivebox.cli.NotProvided[source]
__len__()[source]
__bool__()[source]
__repr__()[source]
archivebox.cli.Omitted[source]

None

archivebox.cli.OMITTED[source]

‘NotProvided(…)’

archivebox.cli.main(args: List[str] | archivebox.cli.Omitted = OMITTED, stdin: IO | archivebox.cli.Omitted = OMITTED, pwd: str | None = None) None[source]