Giter Site home page Giter Site logo

litestar-org / litestar-hello-world Goto Github PK

View Code? Open in Web Editor NEW
8.0 7.0 2.0 147 KB

A minimal implementation of a Litestar application

Home Page: https://litestar.dev

License: MIT License

Makefile 79.58% Python 20.42%
litestar litestar-api litestar-framework litestar-template hacktoberfest

litestar-hello-world's Introduction

Litestar Logo - Light Litestar Logo - Dark

Project Status
CI/CD ci Documentation Building
Quality Coverage Quality Gate Status Maintainability Rating Reliability Rating Security Rating
Package PyPI - Version PyPI - Support Python Versions Starlite PyPI - Downloads Litestar PyPI - Downloads
Community Reddit Discord Matrix Twitter Blog
Meta Litestar Project types - Mypy License - MIT Litestar Sponsors linting - Ruff code style - Black All Contributors

litestar-hello-world

Minimal Litestar Implementation.

Install PDM

Linux/Mac

curl -sSL https://pdm.fming.dev/install-pdm.py | python3 -

Windows

(Invoke-WebRequest -Uri https://pdm.fming.dev/install-pdm.py -UseBasicParsing).Content | python -

Install litestar

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:

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 .

Code Quality

After cloning:

pre-commit install

Run on all files:

pre-commit run --all-files

Run a specific hook:

pre-commit run mypy --all-files

Docs

Important

TODO

litestar-hello-world's People

Contributors

jacobcoffee avatar peterschutt avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.