💻
This was a challenge to build a simple API driven website using EJS and Flask. This api was built using flask with various tooling.
🛠️
The tooling used in the project are as follows.
SQLAlchemy & SQlite
- Database ORM and EngineFlask n' Restful
- API framework and serverflask-redoc
- API documentation using redoc and openapi spec file
Clone the repo and first create a virtual enviroment. The project support python 3
Create a virtual environment by running the following
python -m venv venv
Then install packages by running following
pip install -r requirements.txt
Start the application by running following
python app.py
I used redoc with openapi spec and postman to document the project.
The online documentation is available at this endpoint
challenge/docs
This is a simplified schema of the the various endpoints available
Airport | Endpoints |
---|---|
/airport/${id} - DELETE |
❌ Deletes Airport by given id |
/airport/${id} - GET |
✅ GETS Airport by given id |
/airport/${id} - PUT |
📝 Updates Airport details of a given id |
/airports - PUT |
✅ Get all available Airport details |
/airports - POST |
🔧 Create a new airport |
Plane | Endpoints |
---|---|
/plane - PUT |
📝 Updates Plane details |
/plane/${id} - GET |
✅ Gets Plane of details of given id |
/plane - DELETE |
❌ Deletes Plane of given ID |
/planes - GET |
✅ Gets all available Plane details |
/planes - POST |
🔧 Creates new Plane details |
Flight | Endpoints |
---|---|
/flight/${id} - DELETE |
❌ Deletes a flight of given ID |
/flights - GET |
✅ Gets all available flights |
/flights - POST |
🔧 Creates new flight |