Dataclasses API for PyPI and other warehouses.
Project description
package-index
Check version of a Python module.
Queries PyPI and looks for the <module>.__version__
among all available versions.
Raises an error if the version already exists.
Comes in handy in CI to remember changing library version.
For more on Python module versioning check out PEP-440.
Installation
Available from PyPI:
pip install package-index
Module Example
With a <module> present on PyPI and <module>.py
in current directory:
__version__ = '7.7.7'
...
Simply run:
package-index <module>
If 7.7.7
version of <module> is on PyPI already you’ll get a VersionExists
error:
Traceback (most recent call last):
File "./package-index", line 86, in <module>
main(sys.argv[1:])
File "./package-index", line 82, in main
check_unique(name, version)
File "./package-index", line 28, in check_unique
raise VersionExists(name, version)
__main__.VersionExists: Package "<module>" with version "7.7.7" already exists on PyPI.
Change the "<module>.__version__" to fix this error.
Package Example
Packages work in the same way as modules except __version__
is defined in <module>/__init__.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
package-index-1.0.0b0.tar.gz
(3.3 kB
view hashes)
Built Distribution
Close
Hashes for package_index-1.0.0b0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | efd94087607625ca84fbe95178b804f8ab2289776fde0d9bc312f1d2c2d734be |
|
MD5 | 478fad051663ecdb8b4dd64216bb6ad5 |
|
BLAKE2b-256 | 8b5ef5bfe48eefbaaa490c2e186280f2041a6b11ee561e4151bffab9c2878c3a |