The repository is structured as a DevContainer and contains the following features:
- A Python 3.12 environment installed from the default Microsoft Devcontainer registry.
- A Docker configuration for local and web codespaces development, including a PostgreSQL database.
- PostgreSQL runs on its default port 5432.
- FastAPI
- Uvicorn
- SQLAlchemy
- Alembic
- Pyscopg2
- Python Dotenv
- Python Multipart
- Black
- Pytest
- Pytest-cov
- Coverage
- Python
- Pylance
- Black formatter
- SQL Tools for PostgreSQL
- Install the VSCode Devcontainer extension.
- Open the repository in VSCode.
This project is set up to be used with Visual Studio Code DevContainers. To start the application:
- Open the project in Visual Studio Code.
- Reopen the project in a DevContainer.
- The application will automatically build and start.
Alternatively, you can run the application using Docker Compose:
docker-compose up --build
This project uses Alembic to manage migrations and changes to the database.
- Create a new migration after updating the models:
alembic revision --autogenerate -m "Update models with correct table names and relationships"
- Apply the migrations:
alembic upgrade head