Skip to main content

get_pypi_latest_version

PyPI SemVer2.0 Documentation Status

1. Install package by pypi

pip install get_pypi_latest_version

2. Run by command line

  • Usage:

    $ get_pypi_latest_version -h
    usage: get_pypi_latest_version [-h] [-a] package_name
    
    positional arguments:
    package_name        The specified python package name. e.g. opencv-python.
    
    optional arguments:
    -h, --help          show this help message and exit
    -a, --all_versions  Whether to return all release versions. Default is
                        False.
    
  • Example:

    $ get_pypi_latest_version opencv-python
    # 4.7.0.72
    
    $ get_pypi_latest_version opencv-python -a
    # 4.7.0.72
    # ['4.7.0.72', '4.7.0.68', '4.6.0.66', '4.5.5.64', '4.5.5.62', '4.5.4.60', '4.5.4.58', '4.5.3.56', '4.5.2.54', '4.5.2.52', '4.5.1.48', '4.4.0.46', '4.4.0.44', '4.4.0.42', '4.4.0.40', '4.3.0.38', '4.3.0.36', '4.2.0.34', '4.2.0.32', '4.1.2.30', '4.1.1.26', '4.1.0.25', '4.0.1.24', '4.0.0.21', '3.4.9.33', '3.4.8.29', '3.4.7.28', '3.4.6.27', '3.4.5.20', '3.4.4.19', '3.4.3.18', '3.4.2.17', '3.4.18.65', '3.4.17.63', '3.4.17.61', '3.4.16.59', '3.4.16.57', '3.4.15.55', '3.4.14.53', '3.4.14.51', '3.4.13.47', '3.4.11.45', '3.4.11.43', '3.4.11.41', '3.4.10.37', '3.4.1.15', '3.4.0.14']
    
    # case: package name error
    $ get_pypi_latest_version opencv
    # ValueError: No version information of opencv-pytho. Please check if the package name correct.
    

3. Use by python script

from get_pypi_latest_version import GetPyPiLatestVersion

obtainer = GetPyPiLatestVersion()

package_name = 'opencv-python'
latest_version = obtainer(package_name)
print(latest_version)

result = obtainer(package_name, return_all_versions=True)
latest_version = result[0]
all_versions = result[1]
print(latest_version)
print(all_versions)

Reference

Metadata

Release files for get-pypi-latest-version 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for get-pypi-latest-version 0.1.0
File Interpreter ABI Platform Actions
get_pypi_latest_version-0.1.0-py3-none-any.whl Python 3 none any Details for get_pypi_latest_version-0.1.0-py3-none-any.whl

Release files / get_pypi_latest_version-0.1.0-py3-none-any.whl

Download URL get_pypi_latest_version-0.1.0-py3-none-any.whl
Size 8.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
cfed45689aaa92acb7144a33f576142ca24ec2b3e094fdb9d984c0ed8f263d2a
BLAKE2b-256 checksum
How to use checksums
3436932de1a98399801fd0037f0df32912f9e50b55e12f97edace5ca9a56480d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.9.20

Security for get-pypi-latest-version 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page