Implementation of JWT (JSON Web Token) authentication using Python
with Flask as backend framework to create REST API and PostgreSQL
as database with SQLAlchemy as SQL Connector to Python.
- Create new python venv:
python -m venv <venv_name>
- Activate python venv:
source <venv_name>/bin/activate
- Install dependencies:
pip install -r requirements.txt
- Migrate database:
python app.py -c migrate
- Run development server:
python app.py
- Just Run docker compose:
$ docker-compose up -d db && docker-compose run --rm flaskapp /bin/bash -c "cd /opt/services/flaskapp/src && python app.py -c migrate" && docker-compose up -d
- CAUTION: Fix This!
For API testing, I suggest you to use Postman for testing the API.
For API Docs, you can use Swagger to view the docs.
- You can access it (Swagger UI) through:
<path_to_API>/docs
- or you can generate json from:
<path_to_API>/docs/json
- Fix Docker Config
- Fix OpenAPI Documentation
- Unit Testing
- Logger
- Fix Routing [Done]
- Add Redis
- Add Async
Please refer to this: