Airport and other locations database
Project description
# 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.
`python 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') `
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pyairports-2.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3dfa0cc3e47696692ade92feccdc6b046968f2a75f5e30f65735d6db7251cb26 |
|
MD5 | 5a98d31010e26721384f5b59e398bd95 |
|
BLAKE2b-256 | 6e75b424aebc9f2fc5db319d5df5fff62fa19254c8ef974c254588d48c480df2 |