Skip to main content

Add your description here

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

  1. Clone the repository
  2. 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

py_adsb_historical_data_client-0.3.2.tar.gz (30.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file py_adsb_historical_data_client-0.3.2.tar.gz.

File metadata

File hashes

Hashes for py_adsb_historical_data_client-0.3.2.tar.gz
Algorithm Hash digest
SHA256 5cc65d8619df788726ab439fc05b0327abc47a9620c948f79aa9094689cb2142
MD5 9f926ac91d05fb870f7c86c3e71c1bd1
BLAKE2b-256 0960c74f7e9379e6d0f0655191e112b949e7b67fa25e47010ea026f680df5702

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_adsb_historical_data_client-0.3.2.tar.gz:

Publisher: release-and-publish.yml on Alex-PLACET/py_adsb_historical_data_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_adsb_historical_data_client-0.3.2-py3-none-any.whl.

File metadata

File hashes

Hashes for py_adsb_historical_data_client-0.3.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b90a353d1d5d39e9c2aa017c11b8510c1cf1ba921dfb8090aa9d5440ee1f087
MD5 20ff015ebe5510b2b4e97bab0d1c0761
BLAKE2b-256 d0eec02e7c4d3a1f12a8080771d97c0aa9d4ee524b8530fa2c611c31ea2176ba

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_adsb_historical_data_client-0.3.2-py3-none-any.whl:

Publisher: release-and-publish.yml on Alex-PLACET/py_adsb_historical_data_client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page