French Bee
Python client for finding French Bee airline prices.
Installation
pip install frenchbee
Usage
The FrenchBeeData class is used for looking up travel location codes that French Bee airlines supports. Note that locations include airports and train stations. Available methods are:
- get_locations(): Get all the supported airport and train stations.
The FrenchBee class is used for looking up flight prices and times. Available methods are:
- get_departure_info_for(...): Get pricing info for a specific departure day between two locations.
- get_departure_availability(...): Get pricing info between two locations for the next few months.
- get_return_info_for(...): Get pricing info for a specific departure and return day between two locations.
- get_return_availability(...): Get return pricing info for a specific departure day between two locations for the next few months.
- get_flight_times(...): Get flight times info for a specific departure and return day between two locations.
Get Locations
Get all the French Bee supported airport and train stations.
Example
from frenchbee import FrenchBeeData, Location
client: FrenchBeeData = FrenchBeeData()
locations: List[Location] = list(client.get_locations())
for location in locations:
print(location.json())
Results
{'code': 'PUJ', 'name': 'Punta Cana, Dominican Republic'}
{'code': 'QXB', 'name': 'Aix-en-provence TGV (Railway Station), France '}
{'code': 'QXG', 'name': 'Angers St-Laud TGV (Railway Station), France '}
Get Departure Info
Get pricing info for a specific departure day between two locations.
Example
from datetime import datetime
from frenchbee import FrenchBee
from frenchbee import Trip, PassengerInfo, DateAndLocation, Location, Flight
trip: Trip = Trip(
origin_depart=DateAndLocation(
date=datetime(2022, 10, 6), location=Location("EWR")
),
destination_return=DateAndLocation(
date=None, location=Location("ORY")
),
passengers=PassengerInfo(Adults=1),
)
client: FrenchBee = FrenchBee()
flight: Flight = client.get_departure_info_for(trip)
print(flight.json())
Results
{'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-10-06', 'departure_airport': 'EWR', 'is_offer': False, 'price': 264.0, 'tax': 117.3}
Get Departure Availability
Get pricing info between two locations for the next few months.
Example
from datetime import datetime
from frenchbee import FrenchBee
from frenchbee import Trip, PassengerInfo, DateAndLocation, Location, Flight
trip: Trip = Trip(
origin_depart=DateAndLocation(
date=None, location=Location("EWR")
),
destination_return=DateAndLocation(
date=None, location=Location("ORY")
),
passengers=PassengerInfo(Adults=1),
)
client: FrenchBee = FrenchBee()
flights: Dict[datetime, Flight] = client.get_departure_availability(trip)
for date, flight in flights.items():
print(date, flight.json())
Results
2022-05-28 00:00:00 {'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-05-28', 'departure_airport': 'EWR', 'is_offer': False, 'price': 1115.0, 'tax': 117.3}
2022-05-29 00:00:00 {'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-05-29', 'departure_airport': 'EWR', 'is_offer': True, 'price': 1015.0, 'tax': 117.3}
2022-05-30 00:00:00 {'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-05-30', 'departure_airport': 'EWR', 'is_offer': True, 'price': 1015.0, 'tax': 117.3}
Get Return Info
Get pricing info for a specific departure and return day between two locations.
Example
from datetime import datetime
from frenchbee import FrenchBee
from frenchbee import Trip, PassengerInfo, DateAndLocation, Location, Flight
trip: Trip = Trip(
origin_depart=DateAndLocation(
date=datetime(2022, 10, 6), location=Location("EWR")
),
destination_return=DateAndLocation(
date=datetime(2022, 10, 10), location=Location("ORY")
),
passengers=PassengerInfo(Adults=1),
)
client: FrenchBee = FrenchBee()
flight: Flight = client.get_return_info_for(trip)
print(flight.json())
Results
{'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-10', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
Get Return Availability
Get return pricing info for a specific departure day between two locations for the next few months.
Example
from datetime import datetime
from frenchbee import FrenchBee
from frenchbee import Trip, PassengerInfo, DateAndLocation, Location, Flight
trip: Trip = Trip(
origin_depart=DateAndLocation(
date=datetime(2022, 10, 6), location=Location("EWR")
),
destination_return=DateAndLocation(
date=None, location=Location("ORY")
),
passengers=PassengerInfo(Adults=1),
)
client: FrenchBee = FrenchBee()
flights: Dict[datetime, Flight] = client.get_return_availability(trip)
for date, flight in flights.items():
print(date, flight.json())
Results
2022-10-07 00:00:00 {'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-07', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
2022-10-08 00:00:00 {'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-08', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
2022-10-09 00:00:00 {'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-09', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
Get Flight Times
Get flight times info for a specific departure and return day between two locations.
Example
from datetime import datetime
from frenchbee import FrenchBee
from frenchbee import Trip, PassengerInfo, DateAndLocation, Location, Flight
trip: Trip = Trip(
origin_depart=DateAndLocation(
date=datetime(2022, 10, 6), location=Location("EWR")
),
destination_return=DateAndLocation(
date=datetime(2022, 10, 10), location=Location("ORY")
),
passengers=PassengerInfo(Adults=1),
)
client: FrenchBee = FrenchBee()
trip: Trip = client.get_flight_times(trip)
print(trip.json())
Results
{'destination_return': {'date': '2022-10-10', 'location': {'code': 'ORY'}},
'destination_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 29700000,
'end': {'date': '2022-10-11 01:00:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B'}},
'flight_num': '720',
'start': {'date': '2022-10-10 16:45:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4',
'transport': 'Airbus '
'A350-900'}}}]],
'origin_depart': {'date': '2022-10-06', 'location': {'code': 'EWR'}},
'origin_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 26700000,
'end': {'date': '2022-10-07 10:20:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4'}},
'flight_num': '721',
'start': {'date': '2022-10-07 02:55:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B',
'transport': 'Airbus '
'A350-900'}}}]],
'passengers': {'Adults': 1, 'Children': 0, 'Infants': 0}}
CLI Usage
This package comes bundled with a CLI tool for exploring French Bee prices and times, succinctly named frenchbee-cli that can be installed via poetry install.
usage: frenchbee-cli [-h] {data,flight} ...
Get French Bee airline prices.
positional arguments:
{data,flight}
data Get metadata about French Bee locations.
flight Get flight information.
options:
-h, --help show this help message and exit
Get Locations
>>> frenchbee-cli data --help
usage: frenchbee-cli data [-h] [--locations]
options:
-h, --help show this help message and exit
--locations Get all supported locations.
>>> frenchbee-cli data --locations
{'code': 'PUJ', 'name': 'Punta Cana, Dominican Republic'}
{'code': 'QXB', 'name': 'Aix-en-provence TGV (Railway Station), France '}
{'code': 'QXG', 'name': 'Angers St-Laud TGV (Railway Station), France '}
Get Flight Times
>>> frenchbee-cli flight EWR ORY 2022-10-06 2022-10-10
{'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-10-06', 'departure_airport': 'EWR', 'is_offer': False, 'price': 264.0, 'tax': 117.3}
{'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-10', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
Total price: $596.0 for 2022-10-06 00:00:00 to 2022-10-10 00:00:00 from EWR to ORY
{'destination_return': {'date': '2022-10-10', 'location': {'code': 'ORY'}},
'destination_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 29700000,
'end': {'date': '2022-10-11 01:00:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B'}},
'flight_num': '720',
'start': {'date': '2022-10-10 16:45:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4',
'transport': 'Airbus '
'A350-900'}}}]],
'origin_depart': {'date': '2022-10-06', 'location': {'code': 'EWR'}},
'origin_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 26700000,
'end': {'date': '2022-10-07 10:20:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4'}},
'flight_num': '721',
'start': {'date': '2022-10-07 02:55:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B',
'transport': 'Airbus '
'A350-900'}}}]],
'passengers': {'Adults': 1, 'Children': 0, 'Infants': 0}}
Docker
Containers are automatically built off of the main branch and can be downloaded from: https://hub.docker.com/repository/docker/minormending/frenchbee
Alternatively, you can build your own containers:
>>> docker build -t frenchbee .
>>> docker run frenchbee flight EWR ORY 2022-10-06 2022-10-10
{'arrival_airport': 'ORY', 'currency': 'USD', 'day': '2022-10-06', 'departure_airport': 'EWR', 'is_offer': False, 'price': 264.0, 'tax': 117.3}
{'arrival_airport': 'EWR', 'currency': 'USD', 'day': '2022-10-10', 'departure_airport': 'ORY', 'is_offer': False, 'price': 332.0, 'tax': 186.47}
Total price: $596.0 for 2022-10-06 00:00:00 to 2022-10-10 00:00:00 from EWR to ORY
{'destination_return': {'date': '2022-10-10', 'location': {'code': 'ORY'}},
'destination_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 29700000,
'end': {'date': '2022-10-11 01:00:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B'}},
'flight_num': '720',
'start': {'date': '2022-10-10 16:45:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4',
'transport': 'Airbus '
'A350-900'}}}]],
'origin_depart': {'date': '2022-10-06', 'location': {'code': 'EWR'}},
'origin_segments': [[{'airline_code': 'BF',
'airline_name': 'French Bee',
'duration': 26700000,
'end': {'date': '2022-10-07 10:20:00',
'location': {'code': 'ORY',
'name': 'Orly',
'terminal': '4'}},
'flight_num': '721',
'start': {'date': '2022-10-07 02:55:00',
'location': {'code': 'EWR',
'name': 'Newark Liberty '
'International',
'terminal': 'B',
'transport': 'Airbus '
'A350-900'}}}]],
'passengers': {'Adults': 1, 'Children': 0, 'Infants': 0}}
Metadata
Release files for frenchbee 0.1.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 |
|---|---|---|---|---|
| frenchbee-0.1.1.tar.gz | 32.9 kB | Without provenance | Details for frenchbee-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| frenchbee-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for frenchbee-0.1.1-py3-none-any.whl |
Total release size: 64.7 kB
Release files / frenchbee-0.1.1.tar.gz
| Download URL | frenchbee-0.1.1.tar.gz |
|---|---|
| Size | 32.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e132b23df36cf46c6b528efb947de06ffef5addf19da33cf3453f119a0a4f0b
|
|
BLAKE2b-256 checksum How to use checksums |
7836f31570e102e56e8d0fbdbc4a032095aaf1104ebd32a63f9fb4076c3132db
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.1 Windows/10
|
Release files / frenchbee-0.1.1-py3-none-any.whl
| Download URL | frenchbee-0.1.1-py3-none-any.whl |
|---|---|
| Size | 31.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d7b2fa9ba2902d7cc3b468efc0ea644ebccecb5431858fc431b47ffbbff0494
|
|
BLAKE2b-256 checksum How to use checksums |
f024295b4fa9df06ee597fa6e62d2e058ca06614c6fb49b89c156e9465d873ae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.10.1 Windows/10
|
Security for frenchbee 0.1.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.