This package can parse and compare semantic versioning.
Project description
Version Parser
Der VersionParser kann Versionsnummer parsen und compare welche im format Major-Version, Minor-Version und Build-Version aufgebaut sind.
Mögliche Eingabe Typen sind:
- v1.2.3
- V1.2.3
- v_1_2_3
- V_1_2_3
- 1_2_3
- v1_2_3
- V1_2_3
- VM1m2b3
- VM1m2p3
- vM1m2b3
- vM1m2p3
- 1.2.3
from version_parser.version import Version
>> Version("v2.3.4")
>> Version("v2.3.4") < Version("v2.3.5")
>> v = Version("v2.3.4")
>> v.get_number()
2003004
>> v.get_major_version()
2
>> v.get_minor_version()
3
>> v.get_build_version()
4
>> v.get_type()
VersionType.Version
>> v.get_typed_version(Version.CLASSNAME)
VM2m3b4
VersionTypes
VersionType.FILENAME
"v_{}_{}_{}".format(self._major_version, self._minor_version, self._build_version)
VersionType.CLASSNAME
"VM{}m{}b{}".format(self._major_version, self._minor_version, self._build_version)
VersionType.VERSION
"v{}.{}.{}".format(self._major_version, self._minor_version, self._build_version)
VersionType.STRIPPED_VERSION
"{}.{}.{}".format(self._major_version, self._minor_version, self._build_version)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
version_parser-0.0.1.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file version_parser-0.0.1.tar.gz
.
File metadata
- Download URL: version_parser-0.0.1.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d96be007cf96c421ec4e6962adc6c2d405614be0e8722c610a709ca1af6827ca |
|
MD5 | 2aaca11e37cbc27cced739c9e488cb10 |
|
BLAKE2b-256 | 245f0e0059a7579227b373c5266250a425fa09aed3cefc5449803ec342cabc89 |
File details
Details for the file version_parser-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: version_parser-0.0.1-py3-none-any.whl
- Upload date:
- Size: 3.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.1 setuptools/40.6.2 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.6.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35cc0b381df60119e30f6485196deb518f6ed323fc834b885178ca827fdfcc97 |
|
MD5 | 73b04eb1470e3626dfcab8a87f608a9f |
|
BLAKE2b-256 | ecf673a0da6a880d479e30e9e5c88b35d0e694b5efeee2ad0c3785b021d7b758 |