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 compare, python, generate, Version
Version("11.2-3_4") > Version("9.2-3_4a") == Version("9.2-3.4a")
# output: True
compare("11.1-2_3", "9.1-2_3").is_gt
# output: True
compare("11.1-2_3", "9.1-2_3").is_ge
# output: True
compare("11.1-2_3", "9.1").is_lt
# output: False
compare("11.1-2_3a", "9.1b").is_le
# output: False
compare("11.1-2_3+0006", "11.1-2_3+6").is_equal
# output: True
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.1.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for version_handle-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7fd2c7637d38a2750afbdced88bc0c9933d5634cc6919ee8c3f946cf4c9442f6 |
|
MD5 | 768ea3e89fcf4458b5fecd9189eef908 |
|
BLAKE2b-256 | 9a8071798f67946a8251a5aeab7e85c2e723058d822042b4db8890ff4423f0f4 |