Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jpmens/airportsd
IATA airport code lookup server
https://github.com/jpmens/airportsd
airports ansible api c http iata
Last synced: 2 months ago
JSON representation
IATA airport code lookup server
- Host: GitHub
- URL: https://github.com/jpmens/airportsd
- Owner: jpmens
- License: other
- Created: 2020-10-02T10:14:49.000Z (over 4 years ago)
- Default Branch: trunk
- Last Pushed: 2024-08-05T19:27:37.000Z (5 months ago)
- Last Synced: 2024-10-15T00:26:22.992Z (3 months ago)
- Topics: airports, ansible, api, c, http, iata
- Language: Python
- Homepage: https://jpmens.net/2020/10/04/airports-of-the-world/
- Size: 21 MB
- Stars: 10
- Watchers: 5
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.txt
- License: LICENSE
- Support: support/emoji-flags/LICENSE
Awesome Lists containing this project
README
AIRPORTSD(8) AIRPORTSD(8)
NAME
airportsd - IATA airport code lookup serverSYNOPSIS
airportsd [-v]DESCRIPTION
airportsd is an HTTP-accessible IATA airport code lookup daemon. We
created this as a service students can use on lab machines for
developing an Ansible lookup plugin during trainings.When running on a tty the program will output brief debugging
information on startup, and when itβs queried.The (currently hard-coded) CDB database must exist and be readable by
the owner of the airportsd process.EXAMPLE
$ curl -i http://127.0.0.1:8812/lookup?iata=bcn
HTTP/1.1 200 OK
Date: Wed, 26 Mar 2024 22:17:20 GMT
Connection: close
Content-Type: application/json
Content-Length: 216
{
"id": "4004",
"iata": "BCN",
"cc": "ES",
"city": "Barcelona",
"lat": "41.2971",
"lon": "2.07846",
"name": "Josep Tarradellas Barcelona-El Prat Airport",
"type": "large_airport",
"emoji": "πͺπΈ"
}ENDPOINTS
All airportsd API endpoints are obtained via GET requests.lookup
This endpoint expects iata query parameter with a case insensitive
3-letter IATA airport code; the key is looked up in the database and
the JSON data or HTTP status code 404 are returned.OPTIONS
airportsd understands the following global options.-v show version information and exit
ENVIRONMENT
AIRPORTSD_IP
optionally sets the listen address for airportsd; defaults to
127.0.0.1 and we strongly recommend this is not changed to
anything other than a loopback address.AIRPORTSD_PORT
optionally sets the TCP listen port to something other than the
default 8812.FILES
/usr/local/share/airports.cdb
the database file to query.REQUIREMENTS
freebsd$ pkg install libmicrohttpd tinycdb
$ cat > config.mk <
AUTHOR
Jan-Piet MensUser Manuals AIRPORTSD(8)