A minimal implementation of a Litestar application
['hacktoberfest', 'litestar', 'litestar-api', 'litestar-framework', 'litestar-template']
A minimal implementation of a Litestar application
<!--lint ignore-->
<!--lint disable double-link-->
<!-- markdownlint-disable -->
<p align="center">
  <!-- github-banner-start -->
  <img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Light.svg#gh-light-mode-only" alt="Litestar Logo - Light" width="100%" height="auto" />
  <img src="https://raw.githubusercontent.com/litestar-org/branding/main/assets/Branding%20-%20SVG%20-%20Transparent/Logo%20-%20Banner%20-%20Inline%20-%20Dark.svg#gh-dark-mode-only" alt="Litestar Logo - Dark" width="100%" height="auto" />
  <!-- github-banner-end -->
</p>
<!-- markdownlint-restore -->
<div align="center">
<!-- prettier-ignore-start -->
<!-- markdown-link-check-disable -->
| Project   |     | Status                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          |
| --------- | :-- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| CI/CD     |     |                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           |
| Quality   |     |                                                                                                                                                                                                                            |
| Package   |     |  ![PyPI - Support Python Versions](https://img.shields.io/pypi/pyversions/litestar?labelColor=202235&color=edb641&logo=python&logoColor=edb641) ![Starlite PyPI - Downloads](https://img.shields.io/pypi/dm/starlite?logo=python&label=starlite%20downloads&labelColor=202235&color=edb641&logoColor=edb641) ![Litestar PyPI - Downloads](https://img.shields.io/pypi/dm/litestar?logo=python&label=litestar%20downloads&labelColor=202235&color=edb641&logoColor=edb641)                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                             |
| Community |     |                                                                                                                                                                                                                                                                                                                                             |
| Meta      |     |        |
<!-- prettier-ignore-end -->
</div>
<hr>
# 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