Python package version checker/updater
Check or update the version number defined in a Python source file such as
__init__.py
Sub-commands
check- Verify that the__version__inPY_FILEmatches the one embedded inGIT_TAG_REF.update- Append a timestamped dev version component formatted as.devYYYYmmddHHMMSSto the__version__string inPY_FILE.
Usage:
pyverno check PY_FILE GIT_TAG_REF
pyverno update PY_FILE
Conventions
- The version must be assigned to a variable named
__version__in the providedPY_FILE. The assignment must be at the beginning of the line and have single-character string delimiters, e.g.__version__ = "X.Y.Z". GIT_TAG_REFis formatted asrefs/tags/vX.Y.Z. This implies that git version tags should have the formatvX.Y.Z, where theX.Y.Zportion uses whatever version number format makes sense for the project.
pyverno is not opinionated about version number formats. The only restriction
is that a version number may not contain quote characters of the same style used
to delimit the version string. Exmaples of valid version numbers: 1.0.0,
2025-05-22, 20250522
Purpose
pyverno was developed to automate a version check or update during
trusted publishing to PyPI.
The check command is useful when publishing a new final release, and the
update command is useful to create a reasonably unique version number when
publishing to https://test.pypi.org.
Publishing new versions to PyPI
Push a new tag to Github using the format vX.Y.Z where X.Y.Z matches the
version in pyverno.py.
A new version is published to https://test.pypi.org/p/pyverno on every push to the main branch.
Publishing is automated with Github Actions.
Metadata
Release files for pyverno 1.0.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 |
|---|---|---|---|---|
| pyverno-1.0.0.tar.gz | 10.7 kB | With provenance | Details for pyverno-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyverno-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for pyverno-1.0.0-py3-none-any.whl |
Total release size: 15.6 kB
Release files / pyverno-1.0.0.tar.gz
| Download URL | pyverno-1.0.0.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
903c10c3c403f26a9c4d0072f03a61f066d53ad33511f502a24363fd88a565af
|
|
BLAKE2b-256 checksum How to use checksums |
9413bde04e8e3f82c8987a9b9e1799d4384bb656b0b71175d66663a4e1bf8020
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency logRelease files / pyverno-1.0.0-py3-none-any.whl
| Download URL | pyverno-1.0.0-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c544e13650734cab7fbaa44b79972b8190992c724d11ed64e5eeccf8a089d2c3
|
|
BLAKE2b-256 checksum How to use checksums |
ad978dc58bca83f9f6e4da788c7d424882c7f8c697bcfa0f87ad91c8a055feba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency logSecurity for pyverno 1.0.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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for pyverno-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on May 22, 2025.
Transparency logA 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.