Minimal Litestar Implementation.
curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -
(Invoke-WebRequest -Uri https://pdm.fming.dev/install-pdm.py -UseBasicParsing).Content | python -
pdm install
pdm venv activate
litestar run --reload
curl localhost:8000/sync -w "\n" && curl localhost:8000/async -w "\n"
If you want to use this app to test a local version of Litestar
, change the litestar dependency in pyproject.toml
to:
dev = [
...
"litestar @ git+https://github.com/litestar-org/litestar.git",
]
...or you can add it manually with:
pdm add "git+https://github.com/litestar-org/litestar.git" --dev
Note
See PDM - Editable Dependencies for more info.
Run uvicorn
or any other ASGI-compliant server from the root of this app:
Important
This assumes that Litestar
and this app exist in the same directory.
pdm run uvicorn app:app --reload --reload-dir .
After cloning:
pre-commit install
Run on all files:
pre-commit run --all-files
Run a specific hook:
pre-commit run mypy --all-files
Important
TODO