Project: FastApi monolith application template
Stacks: FastApi / Python3.12
Author: Digital Cube d.o.o
git clone [email protected]:ijdigital/svctpl.git
Create virtual environment.
cd svctpl/
python3.12 -m venv .venv
source .venv/bin/activate
Install requirements:
pip install -r requirements.txt
We will find /src/ directory in the project.
Mark this directory as sources root.
PyCharm:
Right click on /src/ and select 'Mark Directory as' and select 'Sources Root'.
Excpected output should be changed color of /src/ directory to blue.
Command Line (usually used when we develop/deploy project on server):
cd svctpl
cd src/
pwd (copy working directory)
joe .venv/lib/python3.12/site-packages/custompaths.pth
Paste here copied value (pwd of /src/)
Save it and exit.
Restart virtual environment.
deactivate
source .venv/bin/activate
In project you will find env.sample file. Create .env file from env.sample
and populate values.
In /tests/init.py you can specify which database engine you want to use, 'psql' or 'sqlite', by default it'll be psql.
If you chose psql for now you will have to create manually databases, <database_name> and test_<database_name>. In next release we hope that will not be necessary.