This is a simple store API built with Flask, Flask-RESTful, Flask-JWT, and Flask-SQLAlchemy. It also uses the Heroku Postgres add-on as a database.
Live link: https://glaurent-python-flask-api.herokuapp.com/stores
Clone my repo:
git clone https://github.com/glaurent96/Flask-API.git
In order to demo the API, you first need to download Postman to send requests with a body to create a user and authenticate yourself. You will then have access to all the API endpoints.
Step 1: Register User
Step 2: Authenticate User
With this JWT access token you now have access to the locked get item by name endpoint listed below and can perform CRUD operations on items in the stores:
STORES:
POST /store/: (Create a new store)
GET /store/: (Get a store by name)
DEL /store/: (Delete a store by name)
GET /stores: (Get a list of all the existing stores)
ITEMS:
POST /item/: (Create a new item)
GET /item/: (Get an item by name)
PUT /item/: (Update an item by name)
DEL /item/: (Delete an item by name)
GET /items: (Get a list of all the existing items in the store)