Skip to main content

Version

A version is a string that matches the following regex:

"^v?(\d+)(?:.(\d+))?(?:.(\d+))?(?:-?(a|b|rc)(\d+)?)?$"

E.g. v0.11.22-rc3.

Assumptions

  1. v1 is equivalent to v1.0.0
  2. A version without a candidate is greater than its candidate counterpart e.g. v2 > v2rc > v2b > v2a

Installation

pip install rtimbo-version

Usage

>>> from version import Version
>>> v1 = Version("v0.2.11rc3")
>>> v1.major
0
>>> v1.minor
2
>>> v1.patch
11
>>> v1.candidate
'rc'
>>> v1.candidate_number
3
>>> v1 > 0
True
>>> v1 > 1
False
>>> available_versions = [
...     Version("v0.9.2b"),
...     Version("v0.9.1"),
...     Version("v0.9.2"),
...     Version("v2.9.3rc1"),
...     Version("3.0.0"),
...     Version("v0.9.2a1"),
...     Version("v0.9.2rc1"),
...     Version("1.0.0"),
...     Version("2.5.7"),
...     Version("v0.9.2rc3")]
>>> 
>>> print('\n'.join([str(version) for version in sorted(available_versions)]))
v0.9.1
v0.9.2a1
v0.9.2b0
v0.9.2rc1
v0.9.2rc3
v0.9.2
v1.0.0
v2.5.7
v2.9.3rc1
v3.0.0

Metadata

Release files for rtimbo-version 1.0.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 rtimbo-version 1.0.0
File Size Uploaded Provenance Actions
rtimbo-version-1.0.0.tar.gz 2.9 kB Without provenance Details for rtimbo-version-1.0.0.tar.gz

Release files / rtimbo-version-1.0.0.tar.gz

Download URL rtimbo-version-1.0.0.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0d43a289aa67dbe45ca95ecabba6f72efd75c1a0a9698ed86d4ee4b1aac2aab7
BLAKE2b-256 checksum
How to use checksums
8654568825323c42b8c58d02f55e7c9ce2e9e6ef454a4c00e31fa4e59beef422
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.42.1 CPython/3.7.3

Security for rtimbo-version 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.

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

1.0.0 This release

1 release file 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