Skip to content

Philosophers review app with login, Flask, SQLite and JWT

Notifications You must be signed in to change notification settings

nfo94/rest-py-flask

Repository files navigation

Python REST API with Flask, SQLite and JWT

  1. Create virtual environment with Python 3.7
virtualenv -p python3.7 venv
  1. Activate virtual environment
source venv/bin/activate
  1. Install dependencies
pip install -r requirements.txt
  1. Run the application
python app.py
A philosopher looks like this:
{
    "id": 94839485,
    "name": "Jeremy Bentham",
    "reviews": 3.6
}
To create, read, update and delete a philosopher:
  1. POST in http://127.0.0.1:5000/signup a chosen login and password
{
	"login": "letmecheckthisproject",
	"password": "12345"
}
  1. POST the user you created in http://127.0.0.1:5000/login and get the generated token

  2. When performing CRUD, put the token in the header with "Bearer" right before it

post_example

Use a tool like Insomnia or Postman to hit the endpoints and test it.

About

Philosophers review app with login, Flask, SQLite and JWT

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages