Meta tags:
description= The ASGI toolkit that delivers.;
Headings (most frequently used words):
path, lilya, the, to, production, choose, your, motivation, what, does, it, bring, installation, quickstart, learning, paths, definitions, run, application, migrating, from, fastapi, powered, by, new, building, apis, need, one, task, right, now, additional, normal, way, using, decorate, beginner, advanced,
Text of the page (most frequently used words):
lilya (63), the (36), and (28), you (25), path (21), from (19), request (19), user (19), for (15), app (13), production (12), with (11), #application (11), import (11), asgi (10), framework (9), welcome (9), install (9), fastapi (8), def (8), that (8), this (7), run (7), return (7), async (7), toolkit (7), can (7), native (7), client (7), not (6), send (6), receive (6), scope (6), permissions (6), other (6), message (6), are (5), its (5), any (5), responses (5), does (5), system (5), pip (5), first (5), info (4), started (4), server (4), self (4), requests (4), build (4), well (4), middlewares (4), use (4), such (4), tutorials (4), settings (4), routing (4), right (4), declared (4), simple (4), using (4), way (4), want (4), shell (4), project (4), fast (4), csrf (4), tasks (4), one (4), powered (3), great (3), would (3), migration (3), process (3), have (3), help (3), migrating (3), exceptions (3), instead (3), there (3), component (3), them (3), middleware (3), definitions (3), frameworks (3), websocket (3), advanced (3), troubleshooting (3), dependencies (3), applications (3), beginner (3), where (3), learning (3), paths (3), will (3), parameters (3), lot (3), str (3), user_in_request (3), get (3), decorate (3), normal (3), python (3), quickstart (3), additional (3), all (3), more (3), directives (3), installation (3), custom (3), lifespan (3), events (3), http (3), what (3), bring (3), modular (3), motivation (3), need (3), task (3), now (3), building (3), apis (3), lifecycle (3), new (3), choose (3), your (3), dymmond (3), operations (3), files (3), oauth2 (3), security (3), integrations (3), reference (3), how (3), guides (3), tutorial (3), concepts (3), getting (3), who (2), like (2), possible (2), clean (2), startup (2), palfrey (2), example (2), permissiondenied (2), allow (2), kwargs (2), args (2), __init__ (2), asgiapp (2), permissionprotocol (2), lightweight (2), those (2), fledge (2), esmerald (2), permission (2), prefer (2), step (2), wsgi (2), openapi (2), introspection (2), architecture (2), overview (2), just (2), handler (2), search (2), only (2), path_params (2), apps (2), extremely (2), useful (2), some (2), documentation (2), cli (2), ptpython (2), ipython (2), dynamic (2), serializers (2), dependency (2), injection (2), hard (2), directive (2), support (2), fully (2), ready (2), always (2), docker (2), deployment (2), developer (2), workflow (2), readiness (2), checklist (2), layering (2), precedence (2), api (2), mental (2), model (2), https (2), dev (2), page (2), shortcuts (2), proxy (2), signed (2), auth (2), password (2), bearer (2), decorator (2), schedulers (2), query (2), test (2), made, zensical, jetbrains, worth, mentioning, helping, considering, change, even, being, waste, time, reason, created, make, smooth, converter, listening, press, ctrl, quit, 8000, 127, complete, waiting, 140552, myapp, raise, await, headers, admin, none, __call__, super, allowaccess, class, types, protocols, used, working, own, full, words, share, existing, out, meaning, could, design, really, considered, reasoning, because, each, router, seen, independent, format, follow, depending, sequence, tends, work, best, pretty, cool, scratching, surface, parameter, function, automatically, match, against, inject, internal, magic, don, declare, problem, pass, although, unwrap, here, did, notice, require, receives, routes, also, uses, which, something, familiar, toolkits, provides, same, feeling, hypercorn, uvicorn, everything, resources, specific, learn, about, wish, extra, functionalities, scaffold, generation, speed, standard, scaffolds, tools, scalable, bloated, instances, minimum, boilerplate, include, compatibility, asyncio, trio, little, scripts, inside, management, control, optional, compressor, session, cors, on_startup, on_shutdown, known, background, comes, bearing, fruits, almost, 100, pythonic, typed, places, itself, times, won, needing, web, overwhelming, helps, designing, elegant, maintainable, world, alternatives, tool, serves, coming, inspirations, ones, paved, accurate, easy, aims, simplicity, sure, start, pick, these, tracks, official, supported, version, latest, released, github, com, source, code, yet, another, delivers, release, notes, contributing, faq, environments, opentelemetry, mail, abort, relay, jsonify, sending, protection, url, generator, redirect, httpbearer, apikeyinheader, others, basic, scopes, jwt, tokens, interaction, next, steps, introduction, scheduler, schedulerconfig, cqrs, command, responsibility, segregation, sent, sse, channels, forms, body, inference, discovery, clients, threadpool, logging, context, caching, encoders, push, templates, staticfiles, observables, features, graph, applicationgraph, authentication, exception, handlers, controllers, local, debug, realtime, websockets, add, interactions, skip, content,
Text of the page (random words):
lilya lilya skip to content lilya lilya search dymmond lilya lilya getting started concepts tutorials how to guides reference integrations operations project lilya dymmond lilya lilya lilya on this page choose your path new to lilya building production apis i need one task right now motivation what does it bring installation additional quickstart the normal way using lilya to decorate learning paths beginner path production path advanced path definitions run the application migrating from fastapi powered by getting started getting started install and first app first production run concepts concepts asgi mental model request lifecycle layering and precedence component interactions architecture overview tutorials tutorials tutorial build a modular api tutorial add auth and permissions tutorial realtime with websockets how to guides how to guides developer workflow local dev test debug production readiness checklist migration from fastapi reference reference applications settings routing controllers request http query responses dependency injection middleware permissions exceptions exception handlers authentication security parameters lilya introspection graph applicationgraph features lifecycle events lifespan tasks observables staticfiles templates server push websocket wsgi frameworks encoders serializers caching context logging threadpool clients lilya client lilya client lilya client application discovery directives custom directives the directive decorator shell support test client integrations integrations openapi forms and body inference ai server sent events sse channels cqrs command query responsibility segregation schedulers schedulers schedulerconfig handler scheduler decorator security security first introduction interaction next steps oauth2 with password and bearer oauth2 with password bearer with jwt tokens oauth2 scopes http basic auth httpbearer apikeyinheader others signed url generator signed redirect csrf csrf csrf protection files files sending files jsonify proxy proxy relay shortcuts shortcuts abort responses mail opentelemetry operations operations deployment using docker environments troubleshooting faq project project contributing help lilya release notes on this page choose your path new to lilya building production apis i need one task right now motivation what does it bring installation additional quickstart the normal way using lilya to decorate learning paths beginner path production path advanced path definitions run the application migrating from fastapi powered by lilya yet another asgi toolkit that delivers documentation https lilya dev source code https github com dymmond lilya the official supported version is always the latest released choose your path if you are not sure where to start pick one of these tracks new to lilya install and first app asgi mental model request lifecycle build a modular api building production apis first production run layering and precedence production readiness checklist troubleshooting i need one task right now developer workflow migration from fastapi docker deployment motivation in the world of asgi alternatives are always great to have and no tool serves it all lilya coming from the great inspirations of the ones who paved the way its a more simple accurate fast and easy to use python toolkit framework that aims for simplicity a lot of times you won t be needing a fully fledge python web framework as it can be overwhelming for some simple tasks instead you would prefer a simple asgi toolkit that helps you designing production ready fast elegant maintainable and modular applications this is where lilya places itself almost no hard dependencies 100 pythonic fully typed and ready for production what does it bring lilya comes bearing fruits a lightweight asgi toolkit framework support for http websocket tasks in asgi known as background tasks lifespan events on_startup on_shutdown and lifespan native permission system middlewares compressor csrf session cors a native and optional client directive management control system for any custom scripts to run inside the application little hard dependencies compatibility with trio and asyncio dynamic routing system with the help of the native include and minimum boilerplate native settings system no more bloated instances native dependency injection that is extremely scalable clean and fast dynamic native and fast custom serializers installation if you want just the toolkit framework pip install lilya if you want the lilya client for scaffolds and other useful tools pip install lilya standard if you wish to use to extra functionalities such as the shell or directives project scaffold generation to speed up pip install lilya cli ipython for ipython shell pip install lilya cli ptpython for ptpython shell you can learn more about the client in the documentation or if you want to install everything that will allow you to use all the resources of lilya such as some specific middlewares pip install lilya all additional you would want to install an asgi server such as palfrey uvicorn or hypercorn as well quickstart if you are familiar with other python frameworks and toolkits lilya provides you with the same feeling a lilya also uses a native settings system which is something that can be extremely useful for any application the normal way from lilya apps import lilya from lilya requests import request from lilya responses import ok from lilya routing import path async def welcome return ok message welcome to lilya async def user user str return ok message f welcome to lilya user async def user_in_request request request user request path_params user return ok message f welcome to lilya user app lilya routes path user user path in request user user_in_request path welcome using lilya to decorate from lilya apps import lilya from lilya requests import request from lilya responses import ok app lilya app get async def welcome return ok message welcome to lilya app get user async def user user str return ok message f welcome to lilya user app get in request user async def user_in_request request request user request path_params user return ok message f welcome to lilya user is this simple although there is a lot to unwrap here did you notice the path user not only does not require a request to be declared and instead receives a user str well lilya does a lot of internal magic for you if you don t declare a request that is not a problem as it will only pass it if its there if you have the path parameter declared in the function handler as well lilya will automatically search for the parameters declared and match them against the path parameters declared in the path and inject them for you pretty cool right this is just scratching the surface learning paths depending on where you are this sequence tends to work best beginner path applications architecture overview routing requests responses settings production path dependencies middleware permissions exceptions troubleshooting advanced path introspection openapi websocket wsgi frameworks if you prefer a step by step format follow tutorials definitions lilya can be considered a framework or a toolkit and the reasoning for it its because each component such as middlewares permissions path router can be seen as an independent asgi application in other words you can build a middleware or a permission and share those with any other existing asgi framework out there meaning you could design a lilya application middlewares permissions and any other component and re use them in esmerald or fastapi or any other really lilya is not a full fledge framework like esmerald or fastapi instead its a lightweight toolkit framework that can be used to build those as well as working on its own example from lilya exceptions import permissiondenied from lilya protocols permissions import permissionprotocol from lilya requests import request from lilya types import asgiapp receive scope send class allowaccess permissionprotocol def __init__ self app asgiapp args kwargs super __init__ app args kwargs self app app async def __call__ self scope scope receive receive send send none request request scope scope receive receive send send if allow admin in request headers await self app scope receive send return raise permissiondenied run the application to run the application from the example palfrey myapp app info started server process 140552 info waiting for application startup info application startup complete info listening on 127 0 0 1 8000 press ctrl c to quit migrating from fastapi are you considering a change from fastapi even being a great framework you would like not to waste time in the migration process for this reason we have created the lilya converter to help you with the process and make it as smooth as possible and as clean as possible powered by worth mentioning who is helping us jetbrains made with zensical
|