This project is intended to be used as a sample/boilerplate for how to set up FastAPI with SQLAlchemy
- Start a python virtualenv:
python -m venv venv
- Install python dependencies:
pip install -r requirements.txt
- Start PostgreSQL database with Docker (ensure Docker is installed):
invoke start-database
- Run migrations:
invoke run-migrations
- Note: You can wipe out everything in the DB whenever with the following command:
invoke undo-migrations
- Note: You can wipe out everything in the DB whenever with the following command:
- Start the server:
invoke run
- Tests:
invoke test
- Migrations
- Seeding data
- Add seed data:
invoke seed
- Remove all data:
invoke clear-data
- Add seed data:
- When creating the database (
invoke start-database
) command, you can modify the database name, username, and password:invoke start-database --database_name="replace_me" --username="replace_me" --username="replace_me"