Skip to content

Flask example project with flask-restful and flask-jwt-extended!

Notifications You must be signed in to change notification settings

bryaneaton/flask-restful

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A quick project i created while following Jose Salvatierra's excellent flask tutorial on Udemy. https://www.udemy.com/course/rest-api-flask-and-python/learn/lecture/6038434?start=0#overview

✨ Now updated with Flask 2.0 and Flask-Extended!! ✨

Start Postgres or SQL Server db and update credentials on config.py

  • update SQLALCHEMY_DATABASE_URI in app.py with db config name
  • SQL alchemy will create the database objects on app creation.

Example endpoints

Add user

curl -d "username=user1&password=abcd" -X POST http://localhost:5000/register

Login

(Returns Auth Token)

curl -d "username=user1&password=abcd" -X POST http://localhost:5000/user

Add Item

(Replace with Auth Token)

curl -XGET -d "store_id=1&price=2.309" \ -H "Authorization: Bearer paste_token_here http://localhost:5000/item/xyz

About

Flask example project with flask-restful and flask-jwt-extended!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published