File: example.py

package info (click to toggle)
python-opensky 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 468 kB
  • sloc: python: 859; sh: 5; makefile: 4
file content (16 lines) | stat: -rw-r--r-- 385 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
"""Asynchronous Python client for the OpenSky API."""

import asyncio

from python_opensky import OpenSky, StatesResponse


async def main() -> None:
    """Show example of fetching flight states from OpenSky."""
    async with OpenSky() as opensky:
        states: StatesResponse = await opensky.get_states()
        print(states)


if __name__ == "__main__":
    asyncio.run(main())