# 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')
```
Raw data
{
"_id": null,
"home_page": "https://github.com/ozeliger/pyairports",
"name": "pyairports",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "Airports",
"author": "Jason Dsouza",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/be/56/6e46904a6a408e5fbc9f6a345ed94bfb73bdb5251ce39bb60b6bf023c0ed/pyairports-2.1.1.tar.gz",
"platform": null,
"description": "# pyairports\n\npyairports is a package which enables airport lookup by 3-letter IATA code.\n\n# Usage\n\nThe package can be used in two different ways\n\n## import\n\nTo use the package in python code, import and create a local instance of the Airports object.\n\n```python\nfrom pyairports.airports import Airports\nairports = Airports()\nairports.airport_iata(iata) # namedtuple(airport, [name, city, country, iata, icao, lat, lon, alt, tz, dst, tzdb]) or AirportNotFoundException\nairports.other_iata(iata) # namedtuple(other, [iata, name, country, subdiv, type, lat, lon]) or AirportNotFoundException\nairports.lookup(iata) # namedtuple(airport) or namedtuple(other) or AirportNotFoundException\n```\n\n## command line\n\nAn entrypoint is created for command line querying:\n\n```\n[username@hostname ~]$ pyairports aaa\nairport(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')\n```\n\n\n",
"bugtrack_url": null,
"license": "Apache Software License",
"summary": "Airport and other locations database",
"version": "2.1.1",
"project_urls": {
"Homepage": "https://github.com/ozeliger/pyairports"
},
"split_keywords": [
"airports"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "6e75b424aebc9f2fc5db319d5df5fff62fa19254c8ef974c254588d48c480df2",
"md5": "5a98d31010e26721384f5b59e398bd95",
"sha256": "3dfa0cc3e47696692ade92feccdc6b046968f2a75f5e30f65735d6db7251cb26"
},
"downloads": -1,
"filename": "pyairports-2.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "5a98d31010e26721384f5b59e398bd95",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 371714,
"upload_time": "2022-04-01T17:00:42",
"upload_time_iso_8601": "2022-04-01T17:00:42.088662Z",
"url": "https://files.pythonhosted.org/packages/6e/75/b424aebc9f2fc5db319d5df5fff62fa19254c8ef974c254588d48c480df2/pyairports-2.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "be566e46904a6a408e5fbc9f6a345ed94bfb73bdb5251ce39bb60b6bf023c0ed",
"md5": "c891615bb6b9ef1cf8d9ac66303875b1",
"sha256": "3d60a727fce4da81b9c6393ea8ae0b33d67b37ece344dffc863f749e3ad62bcd"
},
"downloads": -1,
"filename": "pyairports-2.1.1.tar.gz",
"has_sig": false,
"md5_digest": "c891615bb6b9ef1cf8d9ac66303875b1",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 364241,
"upload_time": "2022-04-01T17:00:47",
"upload_time_iso_8601": "2022-04-01T17:00:47.880022Z",
"url": "https://files.pythonhosted.org/packages/be/56/6e46904a6a408e5fbc9f6a345ed94bfb73bdb5251ce39bb60b6bf023c0ed/pyairports-2.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-04-01 17:00:47",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ozeliger",
"github_project": "pyairports",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "pyairports"
}