Nob.py
Reasonable defaults for Click CLI applications with rich logging...
... and additional goodies.
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.0
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.0
Usage
import logging
from nob import cli
@cli.cmd()
@cli.opt("--name", required=True, help="Greet someone.")
def hello(lg: logging.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
Clone the repository if you have direct right access or clone your fork:
git clone git@github.com:ThomasByr/nob.py nob
Then:
-
Install uv if you haven't already (or run
uv self update):Linux Bash
curl -LsSf https://astral.sh/uv/install.sh | sh
Windows Powershell
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
-
Install just:
cargo install --locked just just-lsp
List all available recipes by typing
just. -
Sync the codebase dependencies
Without explicit
--all-extrassyncing, some recipes will not evaluate on optional dependencies and functionalities.just sync
Run the following recipes before committing.
We (I) work with ruff, ty and pytest.
just format check ty test
TODOs
- workflow to publish to PyPI
- update the progress module to use human count and duration
Metadata
Release files for nob.py 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nob_py-0.1.2.tar.gz | 19.9 kB | Without provenance | Details for nob_py-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nob_py-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for nob_py-0.1.2-py3-none-any.whl |
Total release size: 46.5 kB
Release files / nob_py-0.1.2.tar.gz
| Download URL | nob_py-0.1.2.tar.gz |
|---|---|
| Size | 19.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
87df5f6f0bf734d9b2bf6978f5cb86d08b27fd67dfe3cc5b9dbfe3ce3fb749e1
|
|
BLAKE2b-256 checksum How to use checksums |
3a65c94408a6a3acb46f919674c3bf2774d339952ba580acc60f0cb0cae71709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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-0.1.2-py3-none-any.whl
| Download URL | nob_py-0.1.2-py3-none-any.whl |
|---|---|
| Size | 26.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
edabca377318f48936c09d160c81b78bbba36110941df630c1c26927f4bf7441
|
|
BLAKE2b-256 checksum How to use checksums |
4e10282a26942c59cc8b725683dbe37b5e59d05827637429b000faa2c2e60516
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.11.16 {"installer":{"name":"uv","version":"0.11.16","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 0.1.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.