flights
The fast, robust, strongly-typed Google Flights scraper (API) implemented in Python. Based on Baes64-encoded Protobuf string.
$ pip install fast-flights
Usage
To use fast-flights, you'll first create a filter (inherited from ?tfs=) to perform a request.
Then, add flight_data, trip, seat and passengers info to use the API directly.
Honorable mention: I like birds. Yes, I like birds.
from fast_flights import FlightData, Passengers, create_filter, get_flights
# Create a new filter
filter = create_filter(
flight_data=[
# Include more if it's not a one-way trip
FlightData(
date="2024-07-02",
from_airport="TPE",
to_airport="MYJ"
)
],
trip="one-way",
seat="economy",
passengers=Passengers(
adults=2,
children=1
),
)
# Get flights from a filter
result = get_flights(filter)
# The price is currently... low/typical/high
print("The price is currently", result.current_price)
# Display the first flight
print(result.flights[0])
Additionally, you can use the Airport enum to search for airports in code (as you type)!
Airport.TAIPEI
|---------------------------------|
| TAIPEI_SONGSHAN_AIRPORT |
| TAPACHULA_INTERNATIONAL_AIRPORT |
| TAMPA_INTERNATIONAL_AIRPORT |
| ... 5 more |
|---------------------------------|
Metadata
Release files for fast-flights 0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_flights-0.1.tar.gz | 42.7 kB | Without provenance | Details for fast_flights-0.1.tar.gz |
Release files / fast_flights-0.1.tar.gz
| Download URL | fast_flights-0.1.tar.gz |
|---|---|
| Size | 42.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3a2bb36a15e7fc1d1a90bcd20b7ecbc8e2018a55a99d1326ce9cacad099e739f
|
|
BLAKE2b-256 checksum How to use checksums |
d61a0adefd2ec8544b6d2187265c10fba2a174bca483e98ed3e3782841a5b7a6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.12.3
|
Security for fast-flights 0.1
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
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.