https://github.com/litestar-org/litestar-hello-world
A minimal implementation of a Litestar application
https://github.com/litestar-org/litestar-hello-world
hacktoberfest litestar litestar-api litestar-framework litestar-template
Last synced: 8 months ago
JSON representation
A minimal implementation of a Litestar application
- Host: GitHub
- URL: https://github.com/litestar-org/litestar-hello-world
- Owner: litestar-org
- License: mit
- Created: 2023-09-16T21:34:46.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-01-18T04:56:04.000Z (over 1 year ago)
- Last Synced: 2024-12-26T20:16:05.695Z (10 months ago)
- Topics: hacktoberfest, litestar, litestar-api, litestar-framework, litestar-template
- Language: Makefile
- Homepage: https://litestar.dev
- Size: 144 KB
- Stars: 12
- Watchers: 8
- Forks: 2
- Open Issues: 6
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
![]()
![]()
| Project | | Status |
| --------- | :-- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CI/CD | | [](https://github.com/litestar-org/litestar-hello-world/actions/workflows/ci.yaml) [](https://github.com/litestar-org/litestar-hello-world/actions/workflows/docs.yaml) |
| Quality | | [](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) [](https://sonarcloud.io/summary/new_code?id=litestar-org_litestar) |
| Package | | [](https://badge.fury.io/py/litestar)    |
| Community | | [](https://reddit.com/r/litestarapi) [](https://discord.gg/litestar-919193495116337154) [](https://matrix.to/#/#litestar:matrix.org) [](https://twitter.com/LitestarAPI) [](https://blog.litestar.dev) |
| Meta | | [](https://github.com/litestar-org/litestar) [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/sponsors/litestar-org) [](https://github.com/astral-sh/ruff) [](https://github.com/psf/black) [](#contributors-) |
# litestar-hello-world
Minimal Litestar Implementation.
## Install PDM
### Linux/Mac
```shell
curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -
```### Windows
```shell
(Invoke-WebRequest -Uri https://pdm.fming.dev/install-pdm.py -UseBasicParsing).Content | python -
```## Install litestar
```sh
pdm install
pdm venv activate
litestar run --reload
curl localhost:8000/sync -w "\n" && curl localhost:8000/async -w "\n"
```## Litestar Development
If you want to use this app to test a local version of `Litestar`, change the litestar dependency in `pyproject.toml` to:
```toml
dev = [
...
"litestar @ git+https://github.com/litestar-org/litestar.git",
]
```...or you can add it manually with:
```shell
pdm add "git+https://github.com/litestar-org/litestar.git" --dev
```> [!NOTE]\
> See [PDM - Editable Dependencies](https://pdm.fming.dev/latest/usage/dependency/#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.```shell
pdm run uvicorn app:app --reload --reload-dir .
```## Code Quality
After cloning:
```shell
pre-commit install
```Run on all files:
```shell
pre-commit run --all-files
```Run a specific hook:
```shell
pre-commit run mypy --all-files
```## Docs
> [!IMPORTANT]\
> TODO