Skip to main content

verstr

Make comparing version strings super simple.

Quick start

If you want codes using your package to be able to verify its version as easily as:

# user_code.py
import my_package
assert my_package.__version__ >= "1.1"

Just customize your package as follows:

# my_package/__init__.py
import verstr
__version__ = verstr.verstr("1.2.4")

or if you are using a tool such as setuptools_scm to generate a _version.py submodule:

# my_package/__init__.py
import verstr
try:
    from . import _version
    __version__ = verstr.verstr(_version.version)
except ImportError:
    __version__ = None

Installation

Install verstr with pip

  pip install verstr

Contributing

You are welcome to help the project, see how.

License

MIT

Metadata

Release files for verstr 0.1.2

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

Source distribution (sdist)

Source distribution for verstr 0.1.2
File Size Uploaded Provenance Actions
verstr-0.1.2.tar.gz 5.0 kB Without provenance Details for verstr-0.1.2.tar.gz

Built distribution (wheel)

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

Total release size: 9.0 kB

Release files / verstr-0.1.2.tar.gz

Download URL verstr-0.1.2.tar.gz
Size 5.0 kB
Tags Source
SHA-256 checksum
How to use checksums
64b47fe4e01778d073796ca76cf8d996a841f15d7c444369e5524f836a5056f7
BLAKE2b-256 checksum
How to use checksums
ea4bbe81fb41c66afe9fbf95958ca07f4ffe14634ad5a287509e65d8c9a3f6d4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Release files / verstr-0.1.2-py3-none-any.whl

Download URL verstr-0.1.2-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
16c2105f63f3932a867293427f3d150bc954fd17cbe58d9784d0070734319bd9
BLAKE2b-256 checksum
How to use checksums
98cb7be0db53ec8b42b65a64f5295d3f23cf18d0ba8ee12daa1557b22384b58d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.7.0 importlib_metadata/4.8.2 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.9

Security for verstr 0.1.2

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.

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