Proviso requirements.txt management
A tool for managing requirements.txt version pinning and updating. Proviso extracts dependencies from your project's setup.py or pyproject.toml, resolves all transitive dependencies using PyPI, and generates a fully pinned requirements.txt file that works across multiple Python versions.
Installation
Command line
pip install proviso
requirements.txt/setup.py
Pinning specific versions or SHAs is recommended to avoid unplanned upgrades.
Versions
# Start with the latest versions and don't just copy what's here
proviso==0.0.1
SHAs
# Start with the latest/specific versions and don't just copy what's here
-e git+https://git@github.com/octodns/proviso.git@ec9661f8b335241ae4746eea467a8509205e6a30#egg=proviso
Usage
Basic usage
Generate a requirements.txt for all currently active Python versions:
proviso
This will:
- Read dependencies from your project's setup.py or pyproject.toml
- Resolve all transitive dependencies from PyPI
- Generate a requirements.txt with pinned versions that work across all currently active Python versions (queried from endoflife.date)
Common options
Generate requirements for specific Python versions:
proviso --python-versions 3.10,3.11,3.12
Include specific extras (e.g., dev dependencies):
proviso --extras dev,test
Specify a custom output file:
proviso --filename requirements-dev.txt
Customize the header comment:
proviso --header "# Generated requirements - do not edit"
By default proviso ignores anything published in the last 7 days, so a brand-new release doesn't get pinned the moment it lands. Adjust the window:
proviso --cooldown-days 14
Or turn it off entirely to always take the newest releases:
proviso --cooldown-days 0
Full command-line reference
usage: proviso [-h] [--directory DIRECTORY] [--extras EXTRAS] [--python-versions PYTHON_VERSIONS] [--filename FILENAME]
[--level {DEBUG,ERROR,INFO,WARNING,debug,error,info,warning}] [--header HEADER] [--cache-db CACHE_DB]
[--cooldown-days COOLDOWN_DAYS]
Extract project requirements, resolve dependencies, and manage requirements.txt
options:
-h, --help show this help message and exit
--directory DIRECTORY
Project root directory (default: current directory)
--extras EXTRAS Comma-separated list of extras to include (e.g., "dev,test"). Defaults to all defined extras.
--python-versions PYTHON_VERSIONS
Comma-separated list of Python versions (e.g., "3.9,3.10,3.11"). Defaults to currently active
versions per endoflife.date.
--filename FILENAME Output filename or path for requirements (default: requirements.txt). If just a filename, will be
placed in --directory; if a path, will be used as-is.
--level {DEBUG,ERROR,INFO,WARNING,debug,error,info,warning}
Logging level (default: WARNING)
--header HEADER Header comment to place at the top of the requirements file. Use the string "[command line]" to
insert the actual command that was run. (default: "# DO NOT EDIT THIS FILE DIRECTLY - use [command
line]")
--cache-db CACHE_DB Path to SQLite database for persistent HTTP caching. If not specified, checks PROVISO_CACHE_DB
environment variable. If neither is set, uses in-memory caching.
--cooldown-days COOLDOWN_DAYS
Exclude packages uploaded within this many days (dependency cooldown). Default: 7. Use 0 to
disable.
Features
- Multi-version support: Generates a single requirements.txt that works across multiple Python versions, using environment markers (e.g.,
package==1.0.0; python_version=='3.10') when different versions are needed - Complete dependency resolution: Recursively resolves all transitive dependencies from PyPI
- Dependency cooldown: Skips releases published within the last 7 days by default so brand-new releases don't get pinned immediately, configurable with
--cooldown-days(0disables it) - Automatic Python version detection: Uses endoflife.date API to determine currently active Python versions
- Extras support: Include optional dependency groups (dev, test, etc.) from your setup.py or pyproject.toml
- Flexible output: Generate requirements files with custom names and locations
Development
See the /script/ directory for some tools to help with the development process. They generally follow the Script to rule them all pattern. Most useful is ./script/bootstrap which will create a venv and install both the runtime and development related requirements. It will also hook up a pre-commit hook that covers most of what's run by CI.
Metadata
Release files for proviso 0.4.0
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 |
|---|---|---|---|---|
| proviso-0.4.0.tar.gz | 35.0 kB | Without provenance | Details for proviso-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| proviso-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for proviso-0.4.0-py3-none-any.whl |
Total release size: 51.7 kB
Release files / proviso-0.4.0.tar.gz
| Download URL | proviso-0.4.0.tar.gz |
|---|---|
| Size | 35.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e8d50253eb0e48296d017c2a55904d7707ba77988fc5ed70361dd8edc646dfcd
|
|
BLAKE2b-256 checksum How to use checksums |
87f7ce76ebcdc85b67fc88f5c667b71eb38518cfcea68bee11d170ed702d60a7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Release files / proviso-0.4.0-py3-none-any.whl
| Download URL | proviso-0.4.0-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f7325d9c44b187dab226f27d0d69a2c364faacc677b86e3c54858f5a90b54899
|
|
BLAKE2b-256 checksum How to use checksums |
ecb2458e556445c0e1634cf628330d2d61666c644c64d611e445cc964000dec1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.10
|
Security for proviso 0.4.0
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.