Metadata-Version: 2.1
Name: pyopensky
Version: 2.8
Summary: A Python interface for OpenSky database
Home-page: https://github.com/open-aviation/pyopensky/
License: MIT
Author: Xavier Olive
Author-email: git@xoolive.org
Requires-Python: >=3.9,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Dist: appdirs (>=1.4.4)
Requires-Dist: httpx (>=0.27.0,<0.28.0)
Requires-Dist: minio (>=7.1)
Requires-Dist: pandas (>=1.5)
Requires-Dist: pyarrow (>=11.0.0)
Requires-Dist: pyjwt (>=2.7.0)
Requires-Dist: tqdm (>=4.65.0)
Requires-Dist: trino[sqlalchemy] (>=0.322)
Requires-Dist: typing-extensions (>=4.5.0)
Project-URL: Repository, https://github.com/open-aviation/pyopensky/
Description-Content-Type: text/markdown

# pyopensky

The `pyopensky` Python library provides functions to download data from the OpenSky Network live API and historical databases. It aims at making ADS-B and Mode S data from OpenSky easily accessible in the Python programming environment.

Full documentation on <https://open-aviation.github.io/pyopensky>

## Installation

```sh
pip install pyopensky
```

The library is also available on conda-forge:

```sh
conda install -c conda-forge pyopensky
```

Development mode (with poetry):

```sh
git clone https://github.com/open-aviation/pyopensky
cd pyopensky
poetry install
```

## Credentials

See details in the [documentation](https://open-aviation.github.io/pyopensky/credentials.html)

## Usage

> [!IMPORTANT]
> The Impala shell is now deprecated. Please upgrade to Trino.

- from the [REST API](https://open-aviation.github.io/pyopensky/rest.html):

  ```python
  from pyopensky.rest import REST

  rest = REST()

  rest.states()
  rest.tracks(icao24)
  rest.routes(callsign)
  rest.aircraft(icao24, begin, end)
  rest.arrival(airport, begin, end)
  rest.departure(airport, begin, end)
  ```

- from the [Trino](https://open-aviation.github.io/pyopensky/trino.html) database (requires authentication):

  ```python
  from pyopensky.trino import Trino

  trino = Trino()
  # full description of the whole set of parameters in the documentation
  trino.flightlist(start, stop, *, airport, callsign, icao24)
  trino.history(start, stop, *, callsign, icao24, bounds)
  trino.rawdata(start, stop, *, callsign, icao24, bounds)
  ```

