Python library to fetch flight data from adsb exchange.
Project description
py_adsb_historical_data_client
Python client to retrieve historical data from adsb databases
Installation
pip install py-adsb-historical-data-client
Usage
from datetime import datetime
from py_adsb_historical_data_client.historical import download_heatmap, download_trace
# Download heatmap data for a specific timestamp
timestamp = datetime(2023, 6, 15, 14, 30)
heatmap_data = download_heatmap(timestamp)
# Download trace data for a specific aircraft
icao = "ABC123"
trace_data = download_trace(icao, timestamp)
Development
Setup
- Clone the repository
- Install dependencies:
uv sync
Running Tests
The project includes comprehensive tests for all functionality.
Run all tests except integration tests (recommended for development):
# Using uv directly
uv run pytest tests/ -m "not integration" -v
# Using the test runner script
python run_tests.py
Run all tests including integration tests:
# Using uv directly
uv run pytest tests/ -v
# Using the test runner script
python run_tests.py --all
Run tests with coverage report:
# Using uv directly
uv run pytest tests/ --cov=src/py_adsb_historical_data_client --cov-report=html --cov-report=term
# Using the test runner script
python run_tests.py --coverage
Test Structure
- Unit Tests: Mock external HTTP requests and test all code paths
- Integration Tests: Make real HTTP requests to test actual API endpoints (marked with
@pytest.mark.integration) - Test Coverage: Comprehensive coverage including edge cases, error handling, and input validation
Available Test Commands
| Command | Description |
|---|---|
python run_tests.py |
Run unit tests only |
python run_tests.py --all |
Run all tests including integration tests |
python run_tests.py --coverage |
Run tests with coverage report |
The test suite covers:
- ✅ Successful data downloads
- ✅ HTTP error handling (404, 500, etc.)
- ✅ Network exception handling
- ✅ Date formatting and URL construction
- ✅ ICAO code processing and case handling
- ✅ Time rounding for heatmap intervals
- ✅ Edge cases (short ICAO codes, etc.)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_adsb_historical_data_client-1.1.0.tar.gz.
File metadata
- Download URL: py_adsb_historical_data_client-1.1.0.tar.gz
- Upload date:
- Size: 52.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67a9c7cb00442a7717f48ce632b0101c47bc4c2ab2b98db674dbd541afe389c6
|
|
| MD5 |
7ab51906f2d6c111341e9a768a1ac4e5
|
|
| BLAKE2b-256 |
aa2dba77436aa6403a9760bede66d43517fb1b09f6d9b1010c0e4216f08e31ef
|
Provenance
The following attestation bundles were made for py_adsb_historical_data_client-1.1.0.tar.gz:
Publisher:
release-and-publish.yml on Alex-PLACET/py_adsb_historical_data_client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_adsb_historical_data_client-1.1.0.tar.gz -
Subject digest:
67a9c7cb00442a7717f48ce632b0101c47bc4c2ab2b98db674dbd541afe389c6 - Sigstore transparency entry: 1008457868
- Sigstore integration time:
-
Permalink:
Alex-PLACET/py_adsb_historical_data_client@14b3d3a1cbf953ed14de95c710d3ed225fed3552 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Alex-PLACET
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-publish.yml@14b3d3a1cbf953ed14de95c710d3ed225fed3552 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file py_adsb_historical_data_client-1.1.0-py3-none-any.whl.
File metadata
- Download URL: py_adsb_historical_data_client-1.1.0-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a97a284ed39391da6c15cf1cffbb404dbc1114e50a5bb87a57a65289856a226d
|
|
| MD5 |
f6ffe86bb9b8a70fec6d019163b16238
|
|
| BLAKE2b-256 |
91e21172cf0e00092874476410e192290e7daebfb16ccac8f445d50f1a38e67b
|
Provenance
The following attestation bundles were made for py_adsb_historical_data_client-1.1.0-py3-none-any.whl:
Publisher:
release-and-publish.yml on Alex-PLACET/py_adsb_historical_data_client
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_adsb_historical_data_client-1.1.0-py3-none-any.whl -
Subject digest:
a97a284ed39391da6c15cf1cffbb404dbc1114e50a5bb87a57a65289856a226d - Sigstore transparency entry: 1008457871
- Sigstore integration time:
-
Permalink:
Alex-PLACET/py_adsb_historical_data_client@14b3d3a1cbf953ed14de95c710d3ed225fed3552 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/Alex-PLACET
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-and-publish.yml@14b3d3a1cbf953ed14de95c710d3ed225fed3552 -
Trigger Event:
workflow_dispatch
-
Statement type: