Skip to main content

ha-opensky-core

Standalone Python library for accessing the OpenSky Network API using OAuth authentication and for performing aircraft, airport and approach analysis.

The library is designed to be usable independently of Home Assistant. Home Assistant-specific functionality is implemented separately in the ha-opensky-oauth integration.

Features

  • OpenSky Network OAuth authentication
  • Search aircraft within a geographic area
  • Aircraft data models using metric units
  • Aircraft metadata lookup
  • Aircraft photo lookup and fallback providers
  • Airport and runway database
  • Airport and runway analysis
  • Aircraft approach detection and tracking
  • Approach entry and exit transitions
  • Reusable ApproachService boundary for frontend applications

Installation

pip install ha-opensky-core

Basic usage

from opensky.client import OpenSkyClient
from opensky.models import SearchArea

area = SearchArea(
    latitude=50.901,
    longitude=4.484,
    radius_km=20,
)

client = OpenSkyClient(...)

aircraft = client.get_aircraft(area)

for item in aircraft:
    print(item.icao24, item.callsign)

The exact authentication and client configuration depends on the OpenSky OAuth credentials available to the application.

Airport database

The package contains the airport and runway databases required by the airport analysis functionality.

from opensky.airport import AirportDatabase

db = AirportDatabase()

print(db.count())

airport = db.require("EBBR")
print(airport.name)

Architecture

ha-opensky-core contains the reusable OpenSky functionality and has no dependency on Home Assistant.

The architecture is intentionally split into two layers:

┌──────────────────────────────────────┐
│       Home Assistant integration     │
│        ha-opensky-oauth              │
└──────────────────┬───────────────────┘
                   │
                   ▼
┌──────────────────────────────────────┐
│          ha-opensky-core             │
│                                      │
│  OAuth / API / Aircraft / Metadata   │
│  Airports / Runways / Approaches     │
└──────────────────┬───────────────────┘
                   │
                   ▼
          OpenSky Network API

This allows the core library to be tested and used independently of Home Assistant.

Development

Clone the repository and create a virtual environment:

python -m venv .venv

Activate the environment and install the package in editable mode:

python -m pip install -e .

Run the available test and diagnostic scripts with:

python -m scripts.test_oauth
python -m scripts.test_metadata
python -m scripts.test_airports

Requirements

  • Python 3.13 or newer
  • OpenSky Network OAuth credentials for authenticated API access

Status

This project is currently in alpha development.

The API may change between releases.

License

MIT License.

Metadata

Release files for ha-opensky-core 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ha-opensky-core 0.1.0
File Size Uploaded Provenance
ha_opensky_core-0.1.0.tar.gz 5.1 MB With provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for ha-opensky-core 0.1.0
File Interpreter ABI Platform
ha_opensky_core-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 10.3 MB

Release files / ha_opensky_core-0.1.0.tar.gz

Download URL ha_opensky_core-0.1.0.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
a8051e7134ecc4d2dc1a1156cf9c642ff8dcf4490f644d0c833cdb29e2b4aa57
BLAKE2b-256 checksum
How to use checksums
a52058dce718b94101acc4dd517e3885e371c44282bf873be68d15b3820539e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / ha_opensky_core-0.1.0-py3-none-any.whl

Download URL ha_opensky_core-0.1.0-py3-none-any.whl
Size 5.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
70306c874400a7e1456c34aeb8e9ccc9784c1fafe9fa221fa054f821a3c67307
BLAKE2b-256 checksum
How to use checksums
cc67a2201f756b143dcc49bc04002aae1fe30fd1e97a24977fed6fe9cc5d18c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Security for ha-opensky-core 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for ha_opensky_core-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page