Project where I build a small backend API for doing e-commerce requests. This app is built using FastAPI framework.
For database connection tool I use SQlAlchemy library that facilitates the conversation with python and database.
- Install Python 3.10
- Install Poetry
- Install Postgresql
-
After you have been install globally in your machine the previous programs, in your bash terminal (or zsh) run the virtual environment where the project will be running. if you don't know what a virtual environment is, check here
This can be activated by running:
poetry shell
poetry is a package dependencies and virtual environments manager so when you run the shell we internally run:
source .venv/bin/activate
-
To run the API for now is just:
python src/app/main.py