Skip to main content

AirTravel Faker Community Provider

Project description

Airtravel provider for Faker


faker_airtravel is a provider for the Faker Python package, and a fork of I would like to thank the maintainer of that repository, since I used the structure to create this one.


faker_airtravel provides airtravel related fake data for testing purposes. The definition of "fake" in this context really means "random," as the airport codes, cities, and locations are real. However, I make no claims about accuracy, so do not use this as location data!


Install with pip:

pip install faker_airtravel

Add as a provider to your Faker instance:

from faker import Faker
from faker_airtravel import AirTravelProvider

If you already use faker, you probably know the conventional use is:

fake = Faker()

Airport Object

>>> fake.airport_object()
{'Airport': 'Tocumen International Airport',
'iata': 'PTY',
'icao': 'MPTO',
'City': 'Tocumen',
'State': 'Panama',
'Country': 'Panama'}

>>> fake.airport_name()
'Lisbon Airport'

Airport Codes (IATA and ICAO)

>>> fake.airport_iata()

>>> fake.airport_icao()


>>> fake.airline()
'Sichuan Airlines'


The flight object is an example of how the data might be combined to create larger structures, and may not be the exact format you need. However it does have the advantage that it will never choose the same 'origin' and 'destination' object.


{'airline': 'Maya Island Air',
 'origin': {'Airport': 'Noi Bai Airport',
  'iata': 'HAN',
  'icao': 'VVNB',
  'City': 'Hanoi',
  'State': 'Ha Noi',
  'Country': 'Vietnam'},
 'destination': {'Airport': 'Geneva Airport',
  'iata': 'GVA',
  'icao': 'LSGG',
  'City': 'Geneva',
  'State': 'Canton of Geneva',
  'Country': 'Switzerland'},
 'stops': 'non-stop',
 'price': 641}

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

faker_airtravel-0.4.tar.gz (18.2 kB view hashes)

Uploaded source

Built Distribution

faker_airtravel-0.4-py2.py3-none-any.whl (18.0 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page