Version compare and version generate and get python version.
Project description
📦 version-handle
Version handle module
Installation
pip install -i https://mirrors.aliyun.com/pypi/simple/ --extra-index-url https://pypi.org/simple/ version-handle
Example
from version_handle import python, generate, Version
Version("11.2-3_4") > Version("9.2-3_4a") == Version("9.2-3.4a")
# output: True
Version("11.1-2_3") > Version("9.1-2_3")
# output: True
Version("11.1-2_3") >= Version("9.1-2_3")
# output: True
Version("11.1-2_3") < Version("9.1")
# output: False
Version("11.1-2_3") <= Version("9.1")
# output: False
Version("9.1.b") > Version("9.1.a")
# output: True
Version("11.1-2_3+0006") == Version("11.1-2_3+6")
# output: True
bool(Version("9.1.b"))
# output: True
bool(Version("++"))
# output: False
python.version()
# output: 3.10.5 (v3.10.5:f377153967, Jun 6 2022, 12:36:10) [Clang 13.0.0 (clang-1300.0.29.30)]
generate((0, 11, 12))
# output: 0.11.12
To Do
- Be the best version of you.
More Resources
- version-handle on github.com
- Official Python Packaging User Guide
- The Hitchhiker's Guide to Packaging
- Cookiecutter template for a Python package
License
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means.
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-handle-0.1.3.tar.gz
(5.1 kB
view details)
Built Distribution
File details
Details for the file version-handle-0.1.3.tar.gz
.
File metadata
- Download URL: version-handle-0.1.3.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | af4f6afb09b0816f4c1a167f46b304fb82ff07ac2dc82cc78914329ab240bb2d |
|
MD5 | 8a04fa18fb51a9ca6399e00793264313 |
|
BLAKE2b-256 | a92440af833443642c7f24472c7d7951f76e14f0cab655c113257fe65d67e880 |
File details
Details for the file version_handle-0.1.3-py3-none-any.whl
.
File metadata
- Download URL: version_handle-0.1.3-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c167832f62570b2c9d0f22c5e18cfc640ad814131c9a0c4308998cc75ccde5ae |
|
MD5 | ecb46d7dd15fcc1f68104ff372644c9f |
|
BLAKE2b-256 | f68c07a6a2669382f335b5a08955716cc1c27dc18d847f59a72323f931c10e99 |