This repository contains a collection of examples showcasing the usage of
the Flask framework. Each application
in this repository is independent and has its own requirements.txt
file.
To set up the environment, follow these steps:
-
Create a virtual environment:
python3 -m venv .venv
-
Activate the virtual environment:
. .venv/bin/activate
-
All in one
python3 -m venv .venv && . .venv/bin/activate
run:
flask --app main run
run tests:
python -m unittest discover -v
coverage:
coverage run --source=./ -m unittest discover
coverage report -m && coverage html
Here are some useful articles related to Flask:
- Testing Flask Applications
- Flask's app.test_client() vs. requests.Session() for Testing
- Testing External API Calls in Flask Applications
- Unit Testing a Flask Application with Pytest
Feel free to explore the examples in this repository and refer to the Flask documentation for more information: Flask Documentation.
This enhanced version provides a clearer structure for the README file, includes instructions for setting up the environment, and formats the articles section for better readability. It also includes a link to the Flask documentation at the end.