Skip to content

NICTA/pyairports

Folders and files

NameName
Last commit message
Last commit date

Latest commit

author
Alex Collins
Aug 18, 2017
9699eae · Aug 18, 2017

History

1 Commit
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017
Aug 18, 2017

Repository files navigation

pyairports

pyairports is a package which enables airport lookup by 3-letter IATA code.

Usage

The package can be used in two different ways

import

To use the package in python code, import and create a local instance of the Airports object.

from pyairports.airports import Airports
airports = Airports()
airports.airport_iata(iata) # namedtuple(airport, [name, city, country, iata, icao, lat, lon, alt, tz, dst, tzdb]) or AirportNotFoundException
airports.other_iata(iata)   # namedtuple(other, [iata, name, country, subdiv, type, lat, lon]) or AirportNotFoundException
airports.lookup(iata)       # namedtuple(airport) or namedtuple(other) or AirportNotFoundException

command line

An entrypoint is created for command line querying:

[username@hostname ~]$ pyairports aaa
airport(name='Anaa', city='Anaa', country='French Polynesia', iata='AAA', icao='NTGA', lat='-17.352606', lon='-145.509956', alt='10', tz='-10', dst='U', tzdb='Pacific/Tahiti')

About

Python module for airport codes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published