I have learned following concept in this app:
- Blueprint
- Application Factory
- Testing: pytest
Minor stuffs:
- Loading config from python file and object.
I have practiced following two skills:
- JWT Based Authentication.
- One to Many Association
Blueprint for following resource:
- Auth
- Author-Title
Tables: Users: id, username, password, email
Author: id, name, age, titles
Title: id, title, summary, author_id
References:
Getting configuration from file: https://hackersandslackers.com/configure-flask-applications/
Answer to Why blueprint is necessary with flask_restful: https://stackoverflow.com/questions/62200557/what-is-the-benefit-of-using-blueprint-in-flask-restful
Testing: https://testdriven.io/blog/flask-pytest/
Testing: https://stackoverflow.com/questions/45703591/how-to-send-post-data-to-flask-using-pytest-flask
Testing: https://pytest-flask.readthedocs.io/en/latest/tutorial.html
https://github.com/vimalloc/flask-jwt-extended/issues/308
To Install Dependencies:
pip install -r requirements.txt
To run the application :
flask --app application run
To run the tests :
pytest --no-header -v