Metadata-Version: 2.4
Name: data-grand-lyon-ha
Version: 0.5.0
Summary: Python library to retrieve data from Grand Lyon open data platform, for Home Assistant.
Project-URL: Source, https://codeberg.org/Crocmagnon/data_grand_lyon_ha
Author: Gabriel Augendre
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.14
Requires-Python: >=3.14
Requires-Dist: aiohttp>=3.11
Description-Content-Type: text/markdown

# data_grand_lyon_ha

Python library to retrieve data from the [Grand Lyon open data platform](https://data.grandlyon.com).

Intended for use as a [Home Assistant](https://www.home-assistant.io/) integration backend.

## Installation

```bash
pip install data-grand-lyon-ha
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv add data-grand-lyon-ha
```

## Usage

```python
import asyncio
import aiohttp
from data_grand_lyon_ha import DataGrandLyonClient, TclPassageType

async def main():
    async with aiohttp.ClientSession() as session:
        client = DataGrandLyonClient(session)
        # Or with authentication:
        # client = DataGrandLyonClient(session, username="user", password="pass")

        # Passages for a specific line, stop, and type
        passages = await client.get_tcl_passages("A", 30101, TclPassageType.THEORETICAL)
        for p in passages:
            print(f"{p.ligne} → {p.direction} in {p.delai_passage}")

        # All passages for a stop (all lines and types)
        all_passages = await client.get_tcl_stop_passages(30101)
        for p in all_passages:
            print(f"{p.ligne} → {p.direction} in {p.delai_passage} [{p.type}]")

asyncio.run(main())
```

## Development

This project uses [uv](https://docs.astral.sh/uv/) for dependency management.

```bash
# Run tests
uv run pytest

# Build the package
uv build
```

## License

MIT
