An example of how to use python, flask and sqlite to make a basic, functioning API
To clone and run this repository you'll need Git and Python. From your command line:
# Clone this repository
git clone https://github.com/MrPickles2009/ExamplePythonAPI.git
# Go into the repository
cd ExamplePythonAPI
# Install dependencies
pip install flask flask-sqlalchemy flask-restful
# Run the app
python server.py
The API request available in this code are:
/vehicles
/vehicles
{
"newData": {
"makeName": "VEHICLE_MAKE",
"modelName": "VEHICLE_MODEL",
"modelYear": VEHICLE_YEAR,
"maxSpeed": VEHICLE_MAX_SPEED
}
}
makeName: string
modelName: string
modelYear: int
maxSpeed: int
/getvehicle/{id}
/deletevehicle/{id}