Skip to main content

Nob.py

Python version PyPI version License: MIT Read the wiki OS GitHub profile

Reasonable defaults for Click CLI applications with rich logging...
... and additional goodies.

  1. Installation
  2. Usage
  3. Contributing

Installation

uv add nob.py

Or:

pip install nob.py
Install from GitHub
uv add git+https://github.com/ThomasByr/nob.py --branch main

or lock a specific version:

uv add git+https://github.com/ThomasByr/nob.py --tag v0.1.3
Or if you are using pip
pip install git+https://github.com/ThomasByr/nob.py@main

You may directly also use @ with a tag, for example:

pip install git+https://github.com/ThomasByr/nob.py@v0.1.3
Available extras
  • ipc - for inter-process communication with posix_ipc (Linux and MacOS only).

Usage

from nob import cli


@cli.cmd()
@cli.opt("--name", required=True, help="Greet someone.")
def hello(lg: cli.Logger, name: str):
    lg.info("Hello %s", name)


if __name__ == "__main__":
    hello()

run with:

uv run <file.py> --name "Eric Norbert"

Replace uv run with python once your environment is activated - if you don't use uv.

Contributing

Pre-requisites

  1. Install uv if you haven't already (or run uv self update):

    Linux Bash
    curl -LsSf https://astral.sh/uv/install.sh | sh
    

    or

    wget -qO- --content-disposition https://astral.sh/uv/install.sh | sh
    
    Windows Powershell
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
  2. Install just:

    With uv
    uv tool install rust-just
    
    Or if you have cargo

    This way you can also install just-lsp.

    cargo install --locked just just-lsp
    

Useful just recipes

List all available recipes
just
Sync the codebase dependencies

Without explicit --all-extras syncing, some recipes will not evaluate on optional dependencies and functionalities.
The sync recipe will also update the dependencies if possible.

just sync
Before committing

We (I) work with ruff, ty and pytest.

just format check ty test
Release a new version

This recipe uses release-it. You will need a working npx installation.

Install fnm with cargo
cargo install fnm --locked
fnm install --lts
fnm use --lts
just release

Metadata

Release files for nob.py 1.6.2

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

Source distribution (sdist)

Source distribution for nob.py 1.6.2
File Size Uploaded Provenance Actions
nob_py-1.6.2.tar.gz 27.7 kB Without provenance Details for nob_py-1.6.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for nob.py 1.6.2
File Interpreter ABI Platform Actions
nob_py-1.6.2-py3-none-any.whl Python 3 none any Details for nob_py-1.6.2-py3-none-any.whl

Total release size: 64.1 kB

Release files / nob_py-1.6.2.tar.gz

Download URL nob_py-1.6.2.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f6f7eab2f92696dd85cd10b2f95c1a7b8109244ff2a310fd5452614a450c6ab2
BLAKE2b-256 checksum
How to use checksums
487983a7d606c753109be84992bcc1cad9f63790ec83e44df229c65aab2d904d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / nob_py-1.6.2-py3-none-any.whl

Download URL nob_py-1.6.2-py3-none-any.whl
Size 36.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cce9949c9195d3733cec3b32d81cbf2ee5d9af1661e9754c5ffc08d2e29e291d
BLAKE2b-256 checksum
How to use checksums
0f21bb48aeb6966ad531f40d9e0063371df40f1cf762c7433a5dc0ebf75a7738
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.13.4 {"installer":{"name":"uv","version":"0.13.4","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for nob.py 1.6.2

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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