Your project description
- Clone repo
git clone Your project url- Create Python Virtual Environment
- Install requirements
pip install -r requirements/requirements.txt- Create PostgreSQL database
- Make .env file
touch .env- Set env variables
- Migrate database
# cd src
alembic upgrade head- Run project
source venv/bin/activate
python manage.py serve --workers 1- Install tests requirements
pip install -r requirements/test_requirements.txt- Create db with prefix "test_"
- Run pytest
source venv/bin/activate
pytestpytest --cov=app --cov-report=html --cov-config=.coveragerc tests/ {username}/{task_short_description}
| Variable | Description | Default |
|---|---|---|
| DATABASE_URI | PostgreSQL URI | postgresql+asyncpg://postgres@localhost:5432/db_name |
| BACKEND_CORS_ORIGINS | Frontend | [] |
| HOST | - | 127.0.0.1 |
| PORT | - | 8000 |
| DEBUG | - | False |
Project structure id described here