Simple Todo App backend
Most of the FastAPI tutorials out there use SqlAlchemy 1. Setting it up with SqlAlchemy 2 and Alembic was a bit of a chore. Hope this helps someone out there.
For a setup with InertiaJS serving Svelte files. Check this branch
- Clone this repo
- Dependencies are in pyproject.toml. Install using
poetryoruv - Edit the .env file with your DB credentials
- Run
uv run alembic upgrade headto run migrations - Run the server with
poetry run python server.pyoruv run python server.pydepending on what you use - Visit http://localhost:8000/docs for the OpenAPI playground
- FastAPI: https://fastapi.tiangolo.com/
- SqlAlchemy 2: https://docs.sqlalchemy.org/en/20/
- Pydantic: https://docs.pydantic.dev/
- Add backend tests
- Add DockerFile