find-flight 0.1.0 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -1
- package/airports.json +1 -0
- package/airports.py +80 -0
- package/countries.json +1 -0
- package/examples/search_flights.py +23 -1
- package/extensions/flight-search.ts +75 -25
- package/flight_runner.py +174 -42
- package/package.json +5 -2
- package/skills/find-flight/SKILL.md +16 -5
package/README.md
CHANGED
|
@@ -12,6 +12,8 @@ Powered by the [`fast-flights`](https://github.com/AWeirdDev/flights) Google Fli
|
|
|
12
12
|
- Search flights between airports on given dates (one-way or round-trip)
|
|
13
13
|
- Real prices, airlines, per-leg times, duration, plane type, stop counts, carbon emissions
|
|
14
14
|
- Filters: seat class, passengers, currency, language, max stops, max price, exclude basic economy
|
|
15
|
+
- **Resolves every airport code to its name, city and ISO-3166 country** before searching (bundled lookup, ~9.7k airports), and returns that metadata per leg plus a ready-to-read route summary — so the extension/caller always knows the country and airport code with certainty
|
|
16
|
+
- Rejects unknown airport codes with a clear error instead of silently querying the wrong city
|
|
15
17
|
- Returns **structured** results — correct per-direction stop counts, no ad-hoc scripts left behind
|
|
16
18
|
|
|
17
19
|
## 📦 Install
|
|
@@ -86,6 +88,9 @@ find-flight/
|
|
|
86
88
|
├── skills/
|
|
87
89
|
│ └── find-flight/SKILL.md # portable agent skill
|
|
88
90
|
├── flight_runner.py # Python executor (structured JSON)
|
|
91
|
+
├── airports.py # airport/country lookup (code -> name, city, state, country)
|
|
92
|
+
├── airports.json # ~9.7k IATA codes -> [name, city, state, ISO-3166 country]
|
|
93
|
+
├── countries.json # ISO-3166 alpha-2 -> English country name
|
|
89
94
|
├── examples/
|
|
90
95
|
│ └── search_flights.py # CLI example
|
|
91
96
|
└── README.md
|
|
@@ -93,7 +98,8 @@ find-flight/
|
|
|
93
98
|
|
|
94
99
|
## ⚙️ Notes / limitations
|
|
95
100
|
|
|
96
|
-
- **
|
|
101
|
+
- **Airport & country resolution:** every endpoint code is resolved (name/city/ISO-3166 country) from the bundled lookup before searching; unknown codes error out. `airports.py`+`airports.json`/`countries.json` are regenerated from the upstream list (`AWeirdDev/flights` `enums/airports.csv`).
|
|
102
|
+
- **Round-trip pricing (verified 2026-09-11):** a single native round-trip query returns the **true two-way total fare** with **outbound legs only**. This package uses that native query as the price source (`round_trip[]`) and adds **one one-way return-direction search** (`return_options[]`) so return-leg schedules are visible at one-way reference fares. Never estimate RT prices by summing two one-way fares.
|
|
97
103
|
- `multi-city` trips are not supported by the upstream library.
|
|
98
104
|
- Scraping Google is subject to rate limits / IP blocks. For heavy use, plug a proxy (BrightData) or richer source (SearchApi) integration into `fast-flights`.
|
|
99
105
|
- Prices are quoted in the `currency` you pass; if omitted, Google picks a default (often the local currency).
|