Skip to main content

Stratis CLI

Project description

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.

Tab Completion

From time to time, our external contributors have added support for tab-completion in a variety of different shells. The files are included in the stratis-cli GitHub release, but they are not supported by the Stratis project. We welcome further contributions to these files and will continue to include them for as long as they seem useful to our users.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

stratis_cli-3.8.1.tar.gz (53.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

stratis_cli-3.8.1-py3-none-any.whl (77.3 kB view details)

Uploaded Python 3

File details

Details for the file stratis_cli-3.8.1.tar.gz.

File metadata

  • Download URL: stratis_cli-3.8.1.tar.gz
  • Upload date:
  • Size: 53.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for stratis_cli-3.8.1.tar.gz
Algorithm Hash digest
SHA256 bfdf752936f63d02f5f3151a424f3b99f04bf5243c4f7f2aa617ba958dea175c
MD5 0ea1aeae6d0ffbc49416b8c33fc13e35
BLAKE2b-256 744b60f1a6abb4298ef06699d72a5895778bbdcb7cc8c78220bb830b1f20e3db

See more details on using hashes here.

File details

Details for the file stratis_cli-3.8.1-py3-none-any.whl.

File metadata

  • Download URL: stratis_cli-3.8.1-py3-none-any.whl
  • Upload date:
  • Size: 77.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for stratis_cli-3.8.1-py3-none-any.whl
Algorithm Hash digest
SHA256 72b138b958ad20bcb17e9d6fa29497faa9f55b7f7289f769d69a639092f8146e
MD5 1b0859a1211c53edb3084f87dcf8e0bb
BLAKE2b-256 eedc4d0e2e14c41c53f90c83289967d817511eb86b908fd857d98dcabc431e08

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page