Metadata-Version: 2.4
Name: apexos-version-client
Version: 1.0.0
Summary: Get the latest ApexOS version from the ApexOS release feeds
License-Expression: MIT
License-File: LICENSE
Author: Advait Thakur
Author-email: advait@apexinfosys.in
Requires-Python: >=3.11
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Dist: aiohttp (>=3.6.1,<4.0)
Requires-Dist: awesomeversion (>=21.8.1)
Project-URL: Bug Tracker, https://github.com/apexinfosysindia/version-client/issues
Project-URL: Repository, https://github.com/apexinfosysindia/version-client
Description-Content-Type: text/markdown

# apexos-version-client

Get the latest ApexOS version from the ApexOS release feeds.

This package is a maintained rebuild of a third-party version-lookup library,
republished under the ApexOS namespace and rewired to the ApexOS release
infrastructure. It resolves the newest available platform version from one of
two sources:

- **`local`** — the version of the ApexOS core package installed in the
  current Python environment (default source).
- **`supervisor`** — the ApexOS version feed at
  `https://version.apexinfosys.in/{channel}.json`, which carries per-channel
  core/OS/supervisor/service versions keyed by image and board.

## Usage

```python
import asyncio
import aiohttp

from apexos_version_client import ApexVersion, ApexVersionChannel, ApexVersionSource


async def main():
    async with aiohttp.ClientSession() as session:
        client = ApexVersion(
            session=session,
            source=ApexVersionSource.SUPERVISOR,
            channel=ApexVersionChannel.DEV,
            board="rpi4-64",
        )
        version, version_data = await client.get_version()
        print(version, version_data)


asyncio.run(main())
```

`get_version()` returns a tuple of the resolved version (an
`awesomeversion.AwesomeVersion`) and a data dict with the feed extras
(`os`, `supervisor`, `cli`, `dns`, `audio`, `multicast`, `observer`, `board`,
`image`). ETag-conditional requests are supported via
`get_version(etag=...)`, which raises `ApexVersionNotModifiedException` on a
304 response.

## Channels

- `dev` — rolling development builds (live today)
- `stable` — stable releases (default)

## Installation

```
pip install apexos-version-client
```

## License

MIT. See [LICENSE](LICENSE) for the full text, including the original
upstream copyright notice, which is retained as required by the license.

