Python package version checker/updater
Project description
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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyverno-1.0.0.tar.gz.
File metadata
- Download URL: pyverno-1.0.0.tar.gz
- Upload date:
- Size: 10.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
903c10c3c403f26a9c4d0072f03a61f066d53ad33511f502a24363fd88a565af
|
|
| MD5 |
2f5e4a3eb460836e09a8b05cbe0c1586
|
|
| BLAKE2b-256 |
9413bde04e8e3f82c8987a9b9e1799d4384bb656b0b71175d66663a4e1bf8020
|
Provenance
The following attestation bundles were made for pyverno-1.0.0.tar.gz:
Publisher:
pypi.yml on dimagi/pyverno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyverno-1.0.0.tar.gz -
Subject digest:
903c10c3c403f26a9c4d0072f03a61f066d53ad33511f502a24363fd88a565af - Sigstore transparency entry: 218266203
- Sigstore integration time:
-
Permalink:
dimagi/pyverno@00f6538e1ef9884dcc4b0eed10105869d15f56e6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/dimagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@00f6538e1ef9884dcc4b0eed10105869d15f56e6 -
Trigger Event:
push
-
Statement type:
File details
Details for the file pyverno-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pyverno-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c544e13650734cab7fbaa44b79972b8190992c724d11ed64e5eeccf8a089d2c3
|
|
| MD5 |
f0c97c58a7ee387ab9b488c8f66b4847
|
|
| BLAKE2b-256 |
ad978dc58bca83f9f6e4da788c7d424882c7f8c697bcfa0f87ad91c8a055feba
|
Provenance
The following attestation bundles were made for pyverno-1.0.0-py3-none-any.whl:
Publisher:
pypi.yml on dimagi/pyverno
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pyverno-1.0.0-py3-none-any.whl -
Subject digest:
c544e13650734cab7fbaa44b79972b8190992c724d11ed64e5eeccf8a089d2c3 - Sigstore transparency entry: 218266239
- Sigstore integration time:
-
Permalink:
dimagi/pyverno@00f6538e1ef9884dcc4b0eed10105869d15f56e6 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/dimagi
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
pypi.yml@00f6538e1ef9884dcc4b0eed10105869d15f56e6 -
Trigger Event:
push
-
Statement type: