Skip to content

Demo project from course: Build professional REST APIs with Python, Flask, Flask-RESTful, and Flask-SQLAlchemy

Notifications You must be signed in to change notification settings

fmgervasoni/flask-restful-and-sqlalchemy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

REST APIs with Flask and Python

Project from course https://udemy.com/course/rest-api-flask-and-python/

Requirements

  • Python 3.10
  • Pip
  • Virtualenv (optional)

Installation

If you decide to run it in a virtual environment, perform the following steps within a virtual environment

pip3 install -r requirements.txt

Run the program

To run the program you need to go to the root directory and execute:

python3 app.py

Endpoints available:

POST - Register an user (example on body request: {"user": "pedro", "password": "myp4ssw0rd"})

/register

POST - Login to the API example: (example on body request: {"user": "pedro", "password": "myp4ssw0rd"})

/login

POST - You need to pass the JWT token on params (Bearer )

/logout

POST - refresh the session token (Bearer )

/refresh

GET - get user information

/user/<user_id>

DEL - delete specific user

/user/<user_id>

GET - get all stores

/stores

GET - get specific store

/store/<name>

POST - add store

/store/<name>

DEL - delete store

/store/<name>

GET - get all items, if you logged in you will get more information

/items

GET - get specific item

/item/<name>

POST - add new item to store (example on body: {"price": 10.24, "store_id": "1"})

/item/<name>

PUT - update the item in the store (example on body: {"price": 10.24, "store_id": "1"})

/item/<name>

DEL - delete specific item

/item/<name>

About

Demo project from course: Build professional REST APIs with Python, Flask, Flask-RESTful, and Flask-SQLAlchemy

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages