python-base-flake
is an opinionated Python package template based on
uv2nix. It aims to provide an instant feedback loop during development
while staying reproducible and interoperable with the Nix ecosystem.
- Reproducible builds with Nix and uv2nix
- Shell environment management with direnv and nix-direnv
- Python dependency management with uv
- Dependency management for anything else with nixpkgs
- Fast container builds with nix2container
- Unit testing with pytest
- Type checking with mypy
- Code formatting with ruff, Prettier, and nixfmt
- Code coverage with Coverage.py
- Documentation with Sphinx and MyST
- Automatic API documentation with Sphinx AutoAPI and napoleon
- Linting enforcement with pre-commit and git-hooks.nix
- Template updates with cruft
- Package updates with Dependabot
- Continuous integration with GitHub Actions
- Common tasks preconfigured with Visual Studio Code
- No opinionation on the package's runtime code
You must have the following already installed to use this:
- Nix with flakes enabled
- direnv integrated into your shell
- cookiecutter or cruft
$ cookiecutter https://github.com/schlarpc/python-base-flake --checkout template
# or
$ cruft create https://github.com/schlarpc/python-base-flake --checkout template