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.1

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.1
File Size Uploaded Provenance
ha_opensky_core-0.1.1.tar.gz 5.1 MB With provenance Details

Built distribution (wheel)

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

Total release size: 10.3 MB

Release files / ha_opensky_core-0.1.1.tar.gz

Download URL ha_opensky_core-0.1.1.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
e55f1e1c4948093b547a81ee5fe3286195748c8f2a5e836c6435acf92f1e6947
BLAKE2b-256 checksum
How to use checksums
12c29f60c06fb79252d0cee363e9a9eb25e847a8a9f485b0199cb19e47e848f0
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 20, 2026.

Transparency log

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

Download URL ha_opensky_core-0.1.1-py3-none-any.whl
Size 5.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d90eecb5fd31c37db95da43a33e3d0cb377d1b6f43b196e60dc115500e4958cd
BLAKE2b-256 checksum
How to use checksums
53e172923bab486361ee2f395494b37975b28091a54107855e7f260ce52d5723
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 20, 2026.

Transparency log

Security for ha-opensky-core 0.1.1

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.1.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 20, 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