fastiot.cli.commands package
commands
This package holds all cli commands defined in the fastiot cli tool
Submodules
fastiot.cli.commands.build module
Build command
- fastiot.cli.commands.build.build(services=<typer.models.ArgumentInfo object>, mode=<typer.models.OptionInfo object>, tag=<typer.models.OptionInfo object>, docker_registry=<typer.models.OptionInfo object>, docker_registry_cache=<typer.models.OptionInfo object>, platform=<typer.models.OptionInfo object>, dry=<typer.models.OptionInfo object>, push=<typer.models.OptionInfo object>, test_deployment_only=<typer.models.OptionInfo object>, no_cache=<typer.models.OptionInfo object>)[source]
This command builds images.
Per default, it builds all images. Optionally, you can specify a single image to build.
fastiot.cli.commands.build_lib module
Commands to compile the project library
- class fastiot.cli.commands.build_lib.BuildLibStyles(value)[source]
An enumeration.
- all = 'all'
- force_all = 'force-all'
- compiled = 'compiled'
- wheel = 'wheel'
- sdist = 'sdist'
- fastiot.cli.commands.build_lib.build_lib(build_style=<typer.models.ArgumentInfo object>, noupdate=<typer.models.OptionInfo object>)[source]
Compile the project library according to the project configuration.
- fastiot.cli.commands.build_lib.update_pyproject_toml(build_system=None, update_requirements=False)[source]
- Parameters:
build_system (
Optional
[Dict
]) – Add a dictionary to be inserted into the buildsytem-part of thepyproject.toml
update_requirements (
Optional
[bool
]) – Use with care! This is basically for the old style, where requirements were managed inrequirements/requirements.txt
and not in pyproject.toml. This should be needed only once, when migrating.
- Returns:
- Return type:
fastiot.cli.commands.clean module
fastiot.cli.commands.config module
- fastiot.cli.commands.config.config(deployments=<typer.models.ArgumentInfo object>, tag=<typer.models.OptionInfo object>, docker_registry=<typer.models.OptionInfo object>, net=<typer.models.OptionInfo object>, pull_always=<typer.models.OptionInfo object>, use_test_deployment=<typer.models.OptionInfo object>, port_offset=<typer.models.OptionInfo object>, use_port_import=<typer.models.OptionInfo object>)[source]
This command generates deployment configs. Per default, it generates all configs. Optionally, you can specify a config to only generate a single deployment config. All generated files will be placed inside the build dir of your project.
For each service the docker images will be executed to import the manifest.yaml file. Therefore, if you want to build one or more deployments you have to be logged in and connected to the corresponding docker registries or build the images locally.
fastiot.cli.commands.create module
Commands for generating new projects and services.
- fastiot.cli.commands.create.new_project(project_name=<typer.models.ArgumentInfo object>, force=<typer.models.OptionInfo object>, target_directory=<typer.models.OptionInfo object>, description=<typer.models.OptionInfo object>)[source]
Function to create a new project with its directory structure and all needed files for a quick start.
You may use the function new-service afterwards to create your first service stubs.
- fastiot.cli.commands.create.new_service(service_name=<typer.models.ArgumentInfo object>, service_package=<typer.models.OptionInfo object>, force=<typer.models.OptionInfo object>)[source]
Create a new service with some method stubs for further programming.
fastiot.cli.commands.deploy module
Command for automatic deployments using ansible playbooks
- fastiot.cli.commands.deploy.deploy(deployments=<typer.models.ArgumentInfo object>, ask_pass=<typer.models.OptionInfo object>, dry=<typer.models.OptionInfo object>)[source]
This command handles deployment of a config using an Ansible Playbook if you have configured any deployments based on
fastiot.cli.model.deployment.DeploymentTargetSetup
in yourdeployment.yaml
.
fastiot.cli.commands.manage_requirements module
fastiot.cli.commands.nuitka_compile module
Command to compile services and packages with Nuitka
- fastiot.cli.commands.nuitka_compile.nuitka_compile(package_name=<typer.models.ArgumentInfo object>, src_dir=<typer.models.OptionInfo object>, out_dir=<typer.models.OptionInfo object>, install_nuitka=<typer.models.OptionInfo object>)[source]
Compiles the selected path as .so file using nuitka. Please make sure to have Nuitka installed as this is an optional dependency.
fastiot.cli.commands.print module
- class fastiot.cli.commands.print.ToPrint(value)[source]
An enumeration.
- project_namespace = 'project_namespace'
- library_package = 'library_package'
- library_setup_py_dir = 'library_setup_py_dir'
- services = 'services'
- deployments = 'deployments'
- integration_test_deployment = 'integration_test_deployment'
- test_package = 'test_package'
- npm_test_dir = 'npm_test_dir'
fastiot.cli.commands.run_tests module
- class fastiot.cli.commands.run_tests.TestRunner(value)[source]
Specify the test runner
- unittest = 'unittest'
Use python’s builtin unittest
- pytest = 'pytest'
Use pytest. This lib must be installed
- pytest_cov = 'pytest-cov'
Use pytest with test coverage option. Please note, that pytest-cov must be installed
- fastiot.cli.commands.run_tests.run_tests(start_deployment=<typer.models.OptionInfo object>, test_runner=<typer.models.OptionInfo object>)[source]
This command will trigger all unittests found in the configured test package. You may use the option –start-deployment to also run your integration test deployment with message broker, ….
fastiot.cli.commands.start module
- fastiot.cli.commands.start.start(deployment_name=<typer.models.ArgumentInfo object>, service_names=<typer.models.ArgumentInfo object>, detach=<typer.models.OptionInfo object>, project_name=<typer.models.OptionInfo object>, use_test_deployment=<typer.models.OptionInfo object>, pull_always=<typer.models.OptionInfo object>)[source]
Starts the selected environment. Be aware that the configuration needs to be built manually before using fiot config.
fastiot.cli.commands.stop module
Implements some stop commands for e.g. environments.