Skip to content

MrPickles2009/ExamplePythonAPI

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Example Python API

An example of how to use python, flask and sqlite to make a basic, functioning API

To Use

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

To Use

The API request available in this code are:

GET Vehicles

/vehicles

POST Vehicles

/vehicles
{
    "newData": {
        "makeName": "VEHICLE_MAKE",
        "modelName": "VEHICLE_MODEL",
        "modelYear": VEHICLE_YEAR,
        "maxSpeed": VEHICLE_MAX_SPEED
    }
}

makeName: string
modelName: string
modelYear: int
maxSpeed: int

GET Vehicle

/getvehicle/{id}

DELETE Vehicle

/deletevehicle/{id}

Releases

No releases published

Packages

No packages published

Languages