Skip to main content

Template for backward compatible python libs with registered cli commands

Project description

bitranox_template_py_lib

CI CodeQL License: MIT Open in Codespaces PyPI PyPI - Downloads Code Style: Ruff codecov Maintainability Known Vulnerabilities security: bandit

Template for backward compatible (3.9 upwards) python libs with registered cli commands

  • CLI entry point styled with rich-click (rich output + click ergonomics)

Install - recommended via UV

UV - the ultrafast installer - written in Rust (10–20× faster than pip/poetry)

# recommended Install via uv 
pip install --upgrade uv
# Create and activate a virtual environment (optional but recommended)
uv venv
# macOS/Linux
source .venv/bin/activate
# Windows (PowerShell)
.venv\Scripts\Activate.ps1
# install via uv from PyPI
uv pip install bitranox_template_py_lib

For alternative install paths (pip, pipx, uv, uvx source builds, etc.), see INSTALL.md. All supported methods register both the bitranox_template_py_lib and bitranox-template-py-cli commands on your PATH.

Python 3.9+ Baseline

  • The project targets Python 3.9 and newer.
  • Runtime dependencies stay on the current stable releases (rich-click>=1.9.4 for beautiful CLI output, tomli>=2.0.0 for Python 3.9-3.10 TOML parsing) and keeps pytest, ruff, pyright, bandit, build, twine, codecov-cli, pip-audit, textual, and import-linter pinned to their newest majors.
  • CI workflows exercise GitHub's rolling runner images (ubuntu-latest, macos-latest, windows-latest) and cover CPython 3.9+ alongside the latest available 3.x release provided by Actions.

Usage

The CLI leverages rich-click so help output, validation errors, and prompts render with Rich styling while keeping the familiar click ergonomics. The scaffold keeps a CLI entry point so you can validate packaging flows, but it currently exposes a single informational command while logging features are developed:

bitranox_template_py_lib info
bitranox_template_py_lib hello
bitranox_template_py_lib fail
bitranox_template_py_lib --traceback fail
bitranox-template-py-cli info
python -m bitranox_template_py_lib info
uvx bitranox_template_py_lib info

For library use you can import the documented helpers directly:

import bitranox_template_py_lib as btpc

btpc.emit_greeting()
try:
    btpc.raise_intentional_failure()
except RuntimeError as exc:
    print(f"caught expected failure: {exc}")

btpc.print_info()

Further Documentation

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

bitranox_template_py_lib-1.0.1.tar.gz (71.0 kB view details)

Uploaded Source

Built Distribution

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

bitranox_template_py_lib-1.0.1-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file bitranox_template_py_lib-1.0.1.tar.gz.

File metadata

File hashes

Hashes for bitranox_template_py_lib-1.0.1.tar.gz
Algorithm Hash digest
SHA256 99b0688b1692fe7eebff81389d10e93e2d41abd4e15397e6bee55875307039d5
MD5 8f640537050b7d094c10f237a2a01845
BLAKE2b-256 f3ce165d5a288f9219305785d7dc9f46c2f8a0a7304ecd513fe1af4d27052f21

See more details on using hashes here.

File details

Details for the file bitranox_template_py_lib-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for bitranox_template_py_lib-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0d9b8d1f6c0c3d0ac4192f978fa97b9fa1ef7773ff3616b024c63890110b928c
MD5 5db40aaae682b76fe419e3fada607ace
BLAKE2b-256 6c918168439f41ed820157152be73b6050448ef36a887a6430e1a319ee4af111

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