Skip to main content

Helpers to bild a CLI program

Project description

cli-base-utilities

tests codecov cli-base-utilities @ PyPi Python Versions License GPL-3.0-or-later

Helpers to bild a CLI program

start development

~$ git clone https://github.com/jedie/cli-base-utilities.git
~$ cd cli-base-utilities
~/cli-base-utilities$ ./dev-cli.py --help

dev CLI

Usage: ./dev-cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ check-code-style            Check code style by calling darker + flake8                          │
│ coverage                    Run and show coverage.                                               │
│ fix-code-style              Fix code style of all cli_base source code files via darker          │
│ install                     Run pip-sync and install 'cli_base' via pip as editable.             │
│ mypy                        Run Mypy (configured in pyproject.toml)                              │
│ publish                     Build and upload this project to PyPi                                │
│ safety                      Run safety check against current requirements files                  │
│ test                        Run unittests                                                        │
│ tox                         Run tox                                                              │
│ update                      Update "requirements*.txt" dependencies files                        │
│ update-test-snapshot-files  Update all test snapshot files (by remove and recreate all snapshot  │
│                             files)                                                               │
│ version                     Print version and exit                                               │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

DEMO app CLI

Usage: ./cli.py [OPTIONS] COMMAND [ARGS]...

╭─ Options ────────────────────────────────────────────────────────────────────────────────────────╮
│ --help      Show this message and exit.                                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────╮
│ demo-endless-loop                Just a useless example command, used in systemd DEMO: It just   │
│                                  print some information in a endless loop.                       │
│ demo-verbose-check-output-error  DEMO for a error calling                                        │
│                                  cli_base.cli_tools.subprocess_utils.verbose_check_output()      │
│ edit-settings                    Edit the settings file. On first call: Create the default one.  │
│ print-settings                   Display (anonymized) MQTT server username and password          │
│ systemd-debug                    Print Systemd service template + context + rendered file        │
│                                  content.                                                        │
│ systemd-remove                   Write Systemd service file, enable it and (re-)start the        │
│                                  service. (May need sudo)                                        │
│ systemd-setup                    Write Systemd service file, enable it and (re-)start the        │
│                                  service. (May need sudo)                                        │
│ systemd-status                   Display status of systemd service. (May need sudo)              │
│ systemd-stop                     Stops the systemd service. (May need sudo)                      │
│ version                          Print version and exit                                          │
╰──────────────────────────────────────────────────────────────────────────────────────────────────╯

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

cli-base-utilities-0.1.1rc0.tar.gz (68.1 kB view details)

Uploaded Source

Built Distribution

cli_base_utilities-0.1.1rc0-py3-none-any.whl (49.9 kB view details)

Uploaded Python 3

File details

Details for the file cli-base-utilities-0.1.1rc0.tar.gz.

File metadata

  • Download URL: cli-base-utilities-0.1.1rc0.tar.gz
  • Upload date:
  • Size: 68.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.6

File hashes

Hashes for cli-base-utilities-0.1.1rc0.tar.gz
Algorithm Hash digest
SHA256 566c7cf2243ab59e83f9bc2e9636bb47587919279e24058faee83e29b206edff
MD5 ef129842661c4304b7be625734ab4406
BLAKE2b-256 c55354bfae6a880813f0f920406739e147d34664e164fdd0ffcd07780ebd3b90

See more details on using hashes here.

Provenance

File details

Details for the file cli_base_utilities-0.1.1rc0-py3-none-any.whl.

File metadata

File hashes

Hashes for cli_base_utilities-0.1.1rc0-py3-none-any.whl
Algorithm Hash digest
SHA256 3521fe0e53487a42e059a43d34aef230825c23eace58c1649ee84bf4d5ecca6c
MD5 91caa23a9f57e4018dc3bf2995ca9315
BLAKE2b-256 bfb453905ba89bc9c63d49231061ceb37651e0b127958bc9d372c9e3533e9578

See more details on using hashes here.

Provenance

Supported by

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