This is the AMI (Application Mobile Interministérielle) notifications API, providing entry points to create and list notifications, and to store push URLs registered from clients (web or mobile).
uv is "An extremely fast Python package and project manager, written in Rust.", and is used to setup and manage the project.
Please follow the installation instructions to set it up on your machine.
Once it's installed, it should be used for everything project related:
- adding more dependencies:
uv add (--dev) <dependency, eg: requests>
- running a script (or editor) in the project's python environment:
uv run <command, eg: code>
ruff is "An extremely fast Python linter and code formatter, written in Rust."
Ruff is used both for:
- linting:
uv run ruff check --fix
- formatting:
uv run ruff format
litestar "is a powerful, flexible, highly performant, and opinionated ASGI framework."
First, you need a local .env
file:
cp .env.template .env
Then start the server using:
uv run litestar run
or simply:
make dev # With live reloading
Then access http://127.0.0.1:8000, or open one of:
- http://127.0.0.1:8000/schema (for ReDoc)
- http://127.0.0.1:8000/schema/swagger (for Swagger UI)
- http://127.0.0.1:8000/schema/elements (for Stoplight Elements)
- http://127.0.0.1:8000/schema/rapidoc (for RapiDoc)
postgresql with asyncpg.
If developping locally, and no DATABASE_URL
env variable is set, it'll default
back to using sqlite.
The DATABASE_URL
should look like the following:
postgresql+asyncpg://[user]:[password]@[url]:[port]/[dbname]
For example for a postgres
database running locally:
postgresql+asyncpg://postgres:some_password@localhost:5432/postgres