Skip to main content

CLI for Stratis Project

A CLI for the Stratis Project.

Introduction

stratis-cli is a tool that provides a command-line interface (CLI) for interacting with the Stratis daemon, stratisd. stratis-cli interacts with stratisd via D-Bus. It is written in Python 3.

stratis-cli is stateless and contains a minimum of storage-related logic. Its code mainly consists of parsing arguments from the command line, calling methods that are part of the Stratis D-Bus API, and then processing and displaying the results.

Installing

You can install stratis-cli directly from the stratis-cli project repo.

stratis-cli has a number of dependencies that may not already be installed. You may choose to allow the setup script to install any missing dependencies from PyPi, or you may prefer to install the dependencies using your distribution’s package manager. All stratis-cli’s direct dependencies are listed in stratis-cli’s setup.py file, in the install_requires field. If you choose to install the dependencies using your installation’s package manager, you should do so before you run the setup.py script.

Finally, run the setup.py script as:

> python setup.py install

Running

After installing, running requires invoking the script, as:

> stratis --help

or:

> stratis --version

To run without installing, check out the source, change to the top directory and set the PYTHONPATH environment variable to include library dependencies. For example (if using bash shell):

> export PYTHONPATH="src:../dbus-client-gen/src:../dbus-python-client-gen/src:../into-dbus-python/src:../dbus-signature-pyparsing/src"
> ./bin/stratis --help

Since stratis uses stratisd’s API, most operations will fail unless you are also running the Stratis daemon.

Testing

Various testing modalities are used to verify various properties of stratis. Please consult the README files in the tests subdirectory for further information.

The project has, and will continue to maintain, 100% code coverage.

Internal Software Architecture

stratis is implemented in two parts:

  • The parser package handles configuring the command line parser, which uses the Python argparse package.

  • The actions package receives valid commands from the parser package and executes them, invoking the D-Bus API as needed. The parser passes command-line arguments given by the user to methods in the actions package using a Namespace object.

Python Coding Style

stratis conforms to PEP-8 style guidelines as enforced by the black formatting tool.

Metadata

Release files for stratis-cli 3.9.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stratis-cli 3.9.1
File Size Uploaded Provenance
stratis_cli-3.9.1.tar.gz 56.8 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for stratis-cli 3.9.1
File Interpreter ABI Platform
stratis_cli-3.9.1-py3-none-any.whl Python 3 none any Details

Total release size: 139.7 kB

Release files / stratis_cli-3.9.1.tar.gz

Download URL stratis_cli-3.9.1.tar.gz
Size 56.8 kB
Tags Source
SHA-256 checksum
How to use checksums
3ac7f280521db3185b39f729ac12f85b44f089e0b538db676cd0b9412d16a053
BLAKE2b-256 checksum
How to use checksums
6861510815a64ee316c48aa792ffe879fd94fcc4b7b3c318d710d8d9e78d109e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / stratis_cli-3.9.1-py3-none-any.whl

Download URL stratis_cli-3.9.1-py3-none-any.whl
Size 82.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fc91286643c0dc1693d8a80c7c1c3c611acb240f2e9f3c20ef2d004dc020fcbf
BLAKE2b-256 checksum
How to use checksums
1a595c52fb1949aa1c310a70ba34a622469096661c3322eed3bc4e07d0f6b91e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.6

Security for stratis-cli 3.9.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page