In this section you will find an overview on how to execute and configure the project.
Dependencies are automatically managed by Poetry
To install dependencies run
poetry install
In same folder where your .toml
file is located.
Poetry will take care of:
- Installing the required Python interpreter
- Installing all the libraries and modules
- Creating the virtual environment for you
Refer to this link to configure Poetry on PyCharm
You can launch the uvicorn server programmatically running directly the main.py file.
python main.py
It is also possible to start the uvicorn live directly server with the command:
uvicorn main:api --reload
- main: the file main.py (the Python "module").
- app: the object created inside of main.py with the line app = FastAPI().
- --reload: make the server restart after code changes. Only use for development.
You can run all test scenarios using:
python -m coverage run -m unittest
To display the coverage results:
coverage report
or with a nicer report as html page:
coverage html