- Docker
- EnvFile plugin for Pycharm: File -> Settings -> Plugins Search for EnvFile, install and restart IDE if required
- Python 3.9 virtual environment
- if using Postgres: in order to
pip install psycpg2we needsudo apt-get install libpq-dev
pip install -e .
pip install -e ".[dev]"- run static tests with:
ruff check --fix
ruff format pytest- open docker-compose and run the MariaDB database service
- from the root folder in the activated virtual environment run
pip install -r requirements.txt - Create a new python run configuration as per image below, note we add the environment variables listed in the
.env_sample file, this will pass all the required info to connect to the local database

Todo:
- add inizialization script to docker to run migrations and database creation
- cors
- fix test unit not running with settings override
in order to pip install psycpg2 we need sudo apt-get install libpq-dev
Full documentation can be found in here:
-
init script to be run only once:
alembic init alembicas pert of the configuration we change the alembic.ini file specifying the file template name as:file_template = %%(epoch)s_%%(slug)s -
create a migration script:
alembic revision --autogenerate -m "create account table" -
running migration:
alembic upgrade head -
partial revision identifier:
alembic upgrade ae1only part of the revision no can be specified as far as it is enough to identify a specific revision. -
relative migration identifiers:
alembic upgrade +2 -
getting information:
alembic currentandalembic history --verbose -
downgrading:
alembic downgrade basebase is a key work to downgrade to the beginning otherwise runalembic downgrade revision_no