API Docs¶
CLI¶
Invenio module to ease the creation and management of applications.
Commands¶
Invenio module to ease the creation and management of applications.
- class invenio_cli.commands.AssetsCommands(cli_config)[source]¶
Local installation commands.
Constructor.
- class invenio_cli.commands.Commands(cli_config)[source]¶
Abstraction over CLI commands that are either local or containerized.
Constructor.
- Parameters
cli_config – :class:CLIConfig instance
- class invenio_cli.commands.ContainersCommands(cli_config, docker_helper=None)[source]¶
Containerized environment CLI commands.
Constructor.
- build(pull=True, cache=True)[source]¶
Return the steps to build images.
- Parameters
pull – Attempt to pull newer versions of the images.
cache – Use cached images and layers.
- declare_queues(project_shortname)[source]¶
Steps to declare the MQ queues required for statistics, etc.
- setup(force, demo_data=True, stop=False, services=True)[source]¶
Return the steps to setup containerize services.
- Parameters
force – Remove existing content (db, indices, etc.).
demo_data – Include demo records.
stop – Stop services after setup.
- start(lock=False, build=False, setup=False, demo_data=True, services=True)[source]¶
Return the steps to start service and application containers.
- Parameters
lock – Lock dependencies.
build – Build containers if not built.
setup – Setup services (db, indices, etc.).
demo_data – Include demo records.
services – Start services or only the application containers. This option is incompatible will all the other flags.
- class invenio_cli.commands.InstallCommands(cli_config)[source]¶
Local installation commands.
Constructor.
- class invenio_cli.commands.LocalCommands(cli_config)[source]¶
Local CLI commands.
Constructor.
- class invenio_cli.commands.PackagesCommands[source]¶
Local installation commands.
- static install_locked_dependencies(pre, dev)[source]¶
Install dependencies from Pipfile.lock using sync.
- static install_packages(packages, log_file=None)[source]¶
Steps to install Python packages.
It is a class method since it does not require any configuration.
- static outdated_packages()[source]¶
Steps to show outdated packages.
It is a class method since it does not require any configuration.
- class invenio_cli.commands.RequirementsCommands[source]¶
Pre-requirements check.
- classmethod check_docker_compose_version(major, minor=-1, patch=-1, exact=False)[source]¶
Check the docker compose version.
- classmethod check_docker_version(major, minor=-1, patch=-1, exact=False)[source]¶
Check the docker version.
- classmethod check_git_version(major, minor=-1, patch=-1, exact=False)[source]¶
Check the git version.
- classmethod check_imagemagick_version(major, minor=-1, patch=-1, exact=False)[source]¶
Check the ImageMagick version.
- classmethod check_node_version(major, minor=-1, patch=-1, exact=False)[source]¶
Check the node version.
- class invenio_cli.commands.ServicesCommands(cli_config, docker_helper=None)[source]¶
Service CLI commands.
Constructor.
- setup(force, demo_data=True, stop=False, services=True)[source]¶
Steps to setup services’ containers.
A check in invenio-cli’s config file is done to see if one-time setup has been executed before.
- class invenio_cli.commands.TranslationsCommands(project_path, instance_path)[source]¶
Translations CLI commands.
Constructor.
- compile(directory=None, fuzzy=False, translation_folder='translations', symlink=True)[source]¶
Compile the message catalog.
- class invenio_cli.commands.UpgradeCommands[source]¶
Local installation commands.
- static upgrade(script_path)[source]¶
Steps to perform an upgrade of the invenio instance.
First, and alembic upgrade is launched to allow alembic to migrate the database using SQLAlchemy. Then, the custom script is executed. Last, the search indices are destroyed, initialized and rebuilt. It is a class method since it does not require any configuration.
Helpers¶
Invenio CLI helpers module.