nv-pylib-template
nv-pylib-template is a Python library template with modern tooling, automated versioning, and dual publishing to PyPI and GCP Artifact Registry. Built with uv for fast dependency management and includes ruff, mypy, and pytest for code quality.
Features
Here's what this template gives you off the bat:
- Modern Python tooling: uv for fast dependency management, ruff for linting/formatting, mypy for type checking, pytest for testing
- Dual publishing: Automatic publishing to both PyPI and GCP Artifact Registry
- Type safety: Strict mypy configuration with comprehensive type hints
- Code quality: Pre-configured ruff linter with sensible defaults
- Testing: pytest with coverage reporting and parametrized test examples
- Command interface: Self-documenting
justrecipes for all development tasks - Environment management: Auto-load environment variables with
direnv - CI/CD: GitHub Actions for testing on PRs and automatic releases on main
- Semantic versioning: Automated version bumping with conventional commits
- Cross-platform: Works on macOS, Linux, Windows (WSL), and Dev Containers
Requirements
- bash 3.2+
- Python 3.12+
- uv (Python package manager)
- just (command runner)
- direnv (environment management)
Run just setup to install all required dependencies automatically.
Optional: just setup --dev for additional development tools (Docker, Claude CLI, etc.).
Quick Start
Scaffold a new project:
# Option 1: Nedavellir CLI (automated)
nv create your-project-name --platform nv-lib-template
# Option 2: GitHub template + scaffold script
# Click "Use this template" on GitHub, then:
git clone your-new-repo
cd ./your-new-repo
bash scripts/scaffold.sh --project your-project-name
Install dependencies and start developing:
just setup # Install Python, uv, and all dependencies
just install # Install project dependencies with uv
just test # Run tests with coverage
just lint # Run linter
just format # Format code
just type-check # Run type checker
just build # Build Python package
Development workflow:
# Make changes to your code
just format # Format code with ruff
just lint # Check code with ruff
just type-check # Verify types with mypy
just test # Run tests with pytest
# Build and publish
just build # Creates wheel and sdist in dist/
just publish # Publishes to PyPI and/or GCP Artifact Registry
Publishing setup (add to GitHub secrets):
# Required for PyPI publishing
PYPI_TOKEN # Get from https://pypi.org/manage/account/token/
# Optional for GCP Artifact Registry
GCP_SA_KEY # GCP service account JSON key
GCP_REGISTRY_PROJECT_ID # GCP project ID
GCP_REGISTRY_REGION # GCP region (e.g., us-east1)
GCP_REGISTRY_NAME # Artifact Registry name
Commit using conventional commits (feat:, fix:, docs:). Push to main and CI/CD will automatically version and publish your package.
Documentation
To learn more about using this template, read the docs:
- User Guide - Complete setup and usage guide
- Architecture - Design and implementation details
TODO
- Pre-release publishing
- Template docs improvements
References
Metadata
Release files for nv-pylib-template 1.0.4
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 |
|---|---|---|---|---|
| nv_pylib_template-1.0.4.tar.gz | 4.6 kB | Without provenance | Details for nv_pylib_template-1.0.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nv_pylib_template-1.0.4-py3-none-any.whl | Python 3 | none | any | Details for nv_pylib_template-1.0.4-py3-none-any.whl |
Total release size: 9.3 kB
Release files / nv_pylib_template-1.0.4.tar.gz
| Download URL | nv_pylib_template-1.0.4.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b9f54a6f2cf10c3e35b3fe0a5fe6253583c2789493092af828975c3c03264567
|
|
BLAKE2b-256 checksum How to use checksums |
e91275e19d48d7961b1bbd14469c1776fac7e082c2495d0596c3bf1fd3d388a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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 / nv_pylib_template-1.0.4-py3-none-any.whl
| Download URL | nv_pylib_template-1.0.4-py3-none-any.whl |
|---|---|
| Size | 4.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ded7dabed665e7b7959ee2a6be8e6c5f835e458093e86235ad19c15847677a42
|
|
BLAKE2b-256 checksum How to use checksums |
38600e27f4756de9a6234a148c09aa2d36bedbb2061293630d0e80dc433deaf4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.9.21 {"installer":{"name":"uv","version":"0.9.21","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 nv-pylib-template 1.0.4
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.