Singer tap for blueprintdata, built with the Meltano Singer SDK.
Project description
tap-airlines-arg
Singer tap (Meltano Singer SDK) that pulls Argentina Airports /all-flights data and emits JSON records ready for any Singer target.
Table of contents
What it does
- Builds partitions for every airport + movement (A/D) for each day from today back to
days_back. - Adds metadata (
x_fetched_at,x_airport_iata,x_movtp,x_date) while keeping all source fields (additionalProperties: true). - Authenticates via header
KeyplusOrigin,User-Agent, and optionalAccept-Language. - Emits a single stream:
aerolineas_all_flights.
API (/all-flights) → tap-airlines-arg → Singer target → Warehouse / files
Quickstart
One flow for both CLI and Meltano users:
# 1) Install (uv keeps deps pinned)
uv sync
# 2) Minimal config (defaults are public; override api_key if you have a private one)
cat > config.local.json <<'EOF'
{
"api_url": "https://webaa-api-h4d5amdfcze7hthn.a02.azurefd.net/web-prod/v1/api-aa",
"api_key": "HieGcY2nFreIsNLuo5EbXCwE7g0aRzTN",
"airports": ["AEP", "EZE"],
"days_back": 1,
"origin": "https://www.aeropuertosargentina.com",
"user_agent": "Mozilla/5.0",
"language": "es-AR"
}
EOF
# 3) Run the tap end-to-end (emits JSONL)
uv run tap-airlines-arg --config config.local.json --test=records > output/aerolineas_all_flights.jsonl
# (Optional) Same config via Meltano with target-jsonl
uv run meltano --environment dev run tap-airlines-arg target-jsonl
Configuration
| Parameter | Type | Default | Description |
|---|---|---|---|
api_url |
string | https://webaa-api-h4d5amdfcze7hthn.a02.azurefd.net/web-prod/v1/api-aa |
Base URL/all-flights |
api_key |
string | HieGcY2nFreIsNLuo5EbXCwE7g0aRzTN |
Header Key value. |
origin |
string | https://www.aeropuertosargentina.com |
header sent to the API |
airports |
array[string] | ["AEP","EZE"] |
IATA codes to query. JSON array preferred |
days_back |
integer | 1 |
Days back from today (UTC, inclusive). 0 = only today. |
user_agent |
string | Mozilla/5.0 |
User-Agent header. |
language |
string | es-AR |
Accept-Language header. |
Tips:
- Config keys map to env vars when using
--config=ENV(e.g.,TAP_AIRLINES_API_KEY,TAP_AIRLINES_AIRPORTS). - Keep
days_backsmall for frequent runs; increase only for backfills.
Use cases
- Daily sync of arrivals/departures for one or more airports into a warehouse.
- Historical backfill for a short window (e.g., last 7–14 days) to analyze delays or cancellations.
- Lightweight monitoring pipeline that forwards fresh records to a downstream alerting system via a Singer target.
Data schema
- Core fields include schedule/estimate times (
stda,etda,atda), flight identifiers (id,nro,idaerolinea,aerolinea), movement (mov), status, gate/sector/belt, aircraft info, and weather snippets. - Metadata appended by the tap:
x_fetched_at,x_airport_iata,x_movtp,x_date. - Full schema:
tap_airlines/schemas/aerolineas_all_flights.json(kept flexible withadditionalProperties: true).
Performance
- The endpoint is single-page; expect tens to a few hundred records per airport/day. Typical default run (AEP+EZE,
days_back=1) stays fast on a laptop. - Throughput is target-dependent; the tap overhead is minimal and comfortably handles hundreds of records per second.
- Recommended
days_back: 0–3 for routine jobs, up to 14 for backfills. Beyond that, consider chunking runs to avoid large date spans.
Troubleshooting
- Invalid airports format: must be JSON array (e.g.,
["AEP","EZE"]). Strings like"AEP,EZE"are normalized, but empty arrays fail validation. Fix the config and rerun. - API authentication failures:
401/403responses mean theKeyheader is missing or invalid. Verifyapi_key,Origin, andUser-Agentmatch the API expectations. - Rate limiting:
429with retry headers. The tap retries automatically; keepdays_backsmall and avoid rapid re-runs. Back off and retry later if limits persist. - Empty responses: typically happens when the airport/movement/date has no flights or dates are out of range. Check
days_back, confirm the airport code, and inspect logs for the requestedairport/movtp/date.
Contributing
Short changes are welcome. Please keep schemas in sync, add/update tests when touching logic, and follow the developer notes in AGENTS.md. Open issues or PRs if anything is unclear.
Project details
Release history Release notifications | RSS feed
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 tap_airlines_arg-1.0.1.tar.gz.
File metadata
- Download URL: tap_airlines_arg-1.0.1.tar.gz
- Upload date:
- Size: 153.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b4d81162000725614dd77c990844312d20be8bc08246f2b5fff0e10abc131996
|
|
| MD5 |
5f15f31090481d76180871b4c5f74e7f
|
|
| BLAKE2b-256 |
c2ac10b37906d1a7df1f1c71fed2b68683dd9b9973a582b3b89141d0b9a34737
|
File details
Details for the file tap_airlines_arg-1.0.1-py3-none-any.whl.
File metadata
- Download URL: tap_airlines_arg-1.0.1-py3-none-any.whl
- Upload date:
- Size: 11.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
02d11e405130bd744b970ecd2d0cbe612ebf8d4004acdd2ce46053f6a04d16f7
|
|
| MD5 |
352e3a8dfaead3f9f7ddc26c72d5bc3c
|
|
| BLAKE2b-256 |
5a7f74d2fc848ab766dad23aa09d2c2fa425b67d85e0c31500a328ee85c5b23a
|