Metadata-Version: 2.4
Name: get_latest_version
Version: 2.0.0
Summary: Python module to get the latest version for various package types.
Author-email: Joe Pitt <joe.pitt@joepitt.co.uk>
License-Expression: GPL-3.0-only
Project-URL: Source, https://github.com/joepitt91/latest_version
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Software Development
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Version Control
Classifier: Typing :: Typed
Requires-Python: ~=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: defusedxml~=0.7.1
Requires-Dist: requests~=2.32.5
Requires-Dist: semver~=3.0.4
Dynamic: license-file

<!--
SPDX-FileCopyrightText: 2025 Joe Pitt

SPDX-License-Identifier: GPL-3.0-only
-->
# Get Latest Version

Python module to get the latest version for various package types.

All package sources, except PyPI support passing a minimum and maximum version to constrain results.

## GitHub Actions

The functions in this module are also available through these GitHub Actions:

* [DockerHub/Current Digest](https://github.com/joepitt91/action-digest-from-dockerhub-image)
* [DockerHub/Latest Version](https://github.com/joepitt91/action-version-from-dockerhub)
* [GitHub/Package Registry](https://github.com/joepitt91/action-version-from-github-package)
* [GitHub/Releases](https://github.com/joepitt91/action-version-from-github-release)
* [GitHub/Tags](https://github.com/joepitt91/action-version-from-github-tag)

## Usage

```sh
pip install get_latest_version
```

### Digest of current `latest` Ubuntu image

```python
from get_latest_version.dockerhub import get_current_image_digest

print(get_current_image_digest(USERNAME, DOCKER_HUB_TOKEN, "ubuntu"))
```

### Latest available version of the Nextcloud AIO image

```python
from get_latest_version.dockerhub import get_latest_image_version

print(get_latest_image_version(USERNAME, DOCKER_HUB_TOKEN, "nextcloud"))
```

### Latest version of Matrix Authentication Service based on GitHub Container Registry versions

```python
from get_latest_version.github import get_latest_version_from_package

print(get_latest_version_from_package(GITHUB_PAT, "element-hq", "matrix-authentication-service"))
```

### Latest version of the ComfyUI based on GitHub releases

```python
from get_latest_version.github import get_latest_version_from_releases

print(get_latest_version_from_releases(GITHUB_PAT, "comfyanonymous", "ComfyUI"))
```

### Latest version of the ComfyUI based on GitHub tags

```python
from get_latest_version.github import get_latest_version_from_tags

print(get_latest_version_from_tags(GITHUB_PAT, "comfyanonymous", "ComfyUI"))
```

### Latest version of the requests from on PyPI

```python
from get_latest_version.pypi import get_current_module_version

print(get_current_module_version("requests"))
```
