Check out this use-case to see how to quickly order some ice cream.
Run the service stack locally with Docker Compose:
docker-compose up # --buildNow go to http://localhost/docs to see the API docs. You can test it right in the browser.
For APIs requiring authentication, make sure to click the "Authorize" button first and place inside any of the test credentials as following:
- username: <e-mail address> (
cmin764@gmail.com)- password: <mocked password> (
cosmin-password)
To bring the stack down and cleanup resources:
docker-compose down --rmi all --volumes --remove-orphansEnsure you have Python 3, Invoke and UV installed, then in the project dir run the following below to install dependencies and run the API server in development mode.
inv run-server -dThe server requires PostgreSQL and Redis up and running.
Ensure proper configuration by copying .env.template into .env first, then change the file to suit your setup.
Don't forget to run migrations first and a task queue worker to deal with deferred tasks:
inv run-migrations
inv run-worker -dinv testinv format-check -finv format-check
inv lintinv type-checkAlternatively, you can run
inv check-allto run all checks without affecting the code.
Check this ToDo list for further improvements and known caveats.