Skip to main content

pylibversion

CircleCI

A library to help manage versions in python libraries.

This package assumes that there is a main package with a __init__.py file with the VERSION defined as a tuple.

For example,

VERSION = (0, 0, 1)

Usage

String based version

You can add a string based version as described in (PEP 396)[https://www.python.org/dev/peps/pep-0396/] to your __init__.py file or in other locations with the version_tuple_to_str function:

from pylibversion import version_tuple_to_str

VERSION = (0, 0, 1)
__version__ = version_tuple_to_str(VERSION)

Include the version in setup.py

You can lookup the module version to include in setup.py with the lookup_local_module_version function:

from pylibversion import lookup_local_module_version

...
setup(
    version=lookup_local_module_version(os.path.join("src", "module_name")),
    ...
)

Compare current version to what is published to PyPi

You can compare the current version to what is published in PyPi with the lookup_latest_version_in_pypi function:

def test_version_has_been_updated():
    module_name = "my_module"
    pypi_version = lookup_latest_version_in_pypi(module_name)
    my_version = my_module.__version__

    assert my_version != pypi_version

Metadata

Release files for pylibversion 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylibversion 0.1.0
File Size Uploaded Provenance Actions
pylibversion-0.1.0.tar.gz 2.9 kB Without provenance Details for pylibversion-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pylibversion 0.1.0
File Interpreter ABI Platform Actions
pylibversion-0.1.0-py3-none-any.whl Python 3 none any Details for pylibversion-0.1.0-py3-none-any.whl

Total release size: 10.3 kB

Release files / pylibversion-0.1.0.tar.gz

Download URL pylibversion-0.1.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
3fff4c481b68029ea49a7f6fea36ea408249301a68255bd810be7dcf4240f0af
BLAKE2b-256 checksum
How to use checksums
2ca11b1a73bf742ddc03dd710116259e6bd84dc773358265581700cc6f4ebd83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

Release files / pylibversion-0.1.0-py3-none-any.whl

Download URL pylibversion-0.1.0-py3-none-any.whl
Size 7.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b58100fdad08ff887d8a813f5e42c51349f5789f8e4a2f8a5a3b3c84a34680e4
BLAKE2b-256 checksum
How to use checksums
0f8a8f8c9910a4f83d44f0c0f15195d567391468498c4e0f5f59893b2d41a2ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.6.2 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.6.9

Security for pylibversion 0.1.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.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page