Skip to main content

Python library to retrieve data from Grand Lyon open data platform, for Home Assistant.

Project description

data_grand_lyon_ha

Python library to retrieve data from the Grand Lyon open data platform.

Intended for use as a Home Assistant integration backend.

Installation

pip install data-grand-lyon-ha

Or with uv:

uv add data-grand-lyon-ha

Usage

import asyncio
import aiohttp
from data_grand_lyon_ha import TCLClient, PassageType

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

        # Passages for a specific line, stop, and type
        passages = await client.get_passages("A", 30101, PassageType.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_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 for dependency management.

# Run tests
uv run pytest

# Build the package
uv build

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

data_grand_lyon_ha-0.4.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file data_grand_lyon_ha-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: data_grand_lyon_ha-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.30 {"installer":{"name":"uv","version":"0.9.30","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"NixOS","version":"25.11","id":"xantusia","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for data_grand_lyon_ha-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ed1fc9acd4b8af3495af81f9153468da1bedbdcff5d5d38cddaa0ce8d9263fba
MD5 e0724cea0f2e0e8b99d9a8e01860297c
BLAKE2b-256 654bd45951e889ed0ccde7e63d8424477bd4c449d3f288bcbb48b041b565a1fe

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page