sqlalchemy-template/README.md
2025-08-03 20:49:40 +03:00

1.1 KiB

Template sqlalchemy-template

This guide covers setting up the project locally for development and testing purposes.

Project Setup

Virtual Environment

It's recommended to use a Python virtual environment to isolate dependencies:

python -m venv venv
. venv/bin/activate

Environment Variables

Copy .env.example to .env and update any credentials, settings, etc.

Install Dependencies

pip install -r src/requirements.txt

Initialize Database

Create migrations from updated database schema:

alembic revision --autogenerate -m "<migrations name>"

Run migrations to setup database schema:

alembic upgrade head

Start Local Development

Start database and other services with docker

docker-compose up -d

Run app

uvicorn app.main:app --reload

Create superuser

python apps/users/scripts/create_user.py -un admin -al 3 -pass adminpass

Useful URLs