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 # --build
Now 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> (
[email protected]
)- password: <mocked password> (
cosmin-password
)
To bring the stack down and cleanup resources:
docker-compose down --rmi all --volumes --remove-orphans
Ensure 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 -d
The 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 -d
inv test
inv format-check -f
inv format-check
inv lint
inv type-check
Alternatively, you can run
inv check-all
to run all checks without affecting the code.
Check this ToDo list for further improvements and known caveats.