Skip to main content

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

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 hashes)

Uploaded Source

Built Distribution

version_handle-0.1.3-py3-none-any.whl (5.0 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page