
Security News
Meet Socket at Black Hat and DEF CON 2025 in Las Vegas
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Check version of a Python module.
Raises an error if the <module>.__version__
:
All of this comes in handy during CI.
And one more thing: No runtime dependencies!
Available from PyPI:
pip install cv
With a <module> present on PyPI and <module>.py
in current directory:
__version__ = '7.7.7'
...
Simply run:
cv <module>
If 7.7.7
version of <module> is on PyPI already you’ll get a VersionExists
error:
__main__.VersionExists: Package "<module>" with version "7.7.7" already exists on PyPI.
Change the "<module>.__version__" to fix this error.
Packages work in the same way as modules except __version__
is defined in <module>/__init__.py
$ cv --help
usage: cv [-h] [-w WAREHOUSE] [--alpha] [--beta] [--rc] [--dev] [--release]
[--dry]
module
Check version of a Python package or module.
positional arguments:
module the package/module with "__version__" defined
optional arguments:
-h, --help show this help message and exit
-w WAREHOUSE, --warehouse WAREHOUSE
package index to use, default is
"https://pypi.org/pypi"
--alpha check that version is an alpha, e.g. 1.0.0a1
--beta check that version is a beta, e.g. 1.0.0b2
--rc check that version is a release candidate, e.g.
1.0.0rc
--dev check that version is in development, e.g. 1.0.0.dev3
--release check that version is a release without modifiers,
e.g. 1.0.0
--dry make no request to PyPI
FAQs
Check version of a Python module
We found that cv demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Meet Socket at Black Hat & DEF CON 2025 for 1:1s, insider security talks at Allegiant Stadium, and a private dinner with top minds in software supply chain security.
Security News
CAI is a new open source AI framework that automates penetration testing tasks like scanning and exploitation up to 3,600× faster than humans.
Security News
Deno 2.4 brings back bundling, improves dependency updates and telemetry, and makes the runtime more practical for real-world JavaScript projects.