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

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

Built distribution (wheel)

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

Total release size: 10.3 MB

Release files / ha_opensky_core-0.1.2.tar.gz

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

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 Oct 23, 2026.

Transparency log

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

Download URL ha_opensky_core-0.1.2-py3-none-any.whl
Size 5.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
715925f583f84829f01e538029ee552ce3cc0ff1130c47fea3b394981bb565d0
BLAKE2b-256 checksum
How to use checksums
1046c838f8d2ac53e0a0050beffa5f4c7e489ee450836fefb2e4b0d78660ecf3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 23, 2026.

Transparency log

Security for ha-opensky-core 0.1.2

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.2.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 Oct 23, 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