Best Flask open-source libraries and packages

Flask rest sample

Sample Flask REST API
Updated 1 year ago

Flask REST Sample

This Repo Contains Simple REST API that gets Airport and Airline Details

Requirements

  • python 2.7+
  • flask
  • flask_restful

Installation

$ pip install -r requirements.txt

Run

$ python application.py

 * Serving Flask app "application" (lazy loading)
 * Environment: production
   WARNING: Do not use the development server in a production environment.
   Use a production WSGI server instead.
 * Debug mode: on
 * Running on http://127.0.0.1:5000/ (Press CTRL+C to quit)
 * Restarting with stat
 * Debugger is active!

Test

goto --> localhost:5000/

Alt text

Start Using

GET

Airports

  • localhost:5000/airport/{IATA_code}
  • localhost:5000/airportname/{IATA_code}
  • localhost:5000/airportlocation/{IATA_code}

Airlines

  • localhost:5000/airline/{IATA_code}
  • localhost:5000/airlinecode/{airline_ID}

POST

  • Soon ... !!

Example

Airport

Alt text

Airline

Alt text

Reference

Airport and Airline data from https://openflights.org/data