Releases: dymmond/lilya
Releases · dymmond/lilya
Release list
Version 0.27.0
Added
- First-class support for the HTTP
QUERYmethod standardized by RFC 10008, including route registration withmethods=["QUERY"],@app.query()decorators, controller dispatch, middleware visibility, and client helpers. QUERYrequest bodies are available through Lilya's normal request parsing APIs, including JSON and raw body access.- New HTTP QUERY documentation covering safe/idempotent semantics, when to use
QUERYinstead ofGETorPOST, request bodies, OpenAPI behavior, and client/proxy caveats.
Changed
- OpenAPI schema generation and documentation surfaces now default to OpenAPI
3.2.0. CSRFMiddlewaretreatsQUERYas a safe method by default.CORSMiddleware(allow_methods=["*"])now includesQUERY.
Version 0.26.2
Fixed
- Query, header, and cookie parameter casting now handles repeated values correctly, preserving list-style inputs instead of nesting them.
- Parameter casting now supports typed collection casts such as
list[str],dict[str, int], and nested union collections likelist[str | int | dict[str, str]]. cast=listnow treats a single string value as a one-item list instead of splitting it into characters.- Default parameter values are now passed through their configured cast when applicable.
Version 0.26.1
Added
unique_identifierfield for UserInterface. This is required for tracking authenticated users in libraries.infer_bodycan now be passed in aLilyainstance directly and it will be applied globally to all the dependencies and handlers in the application. This allows you to have a global body inference without having to specify it in each dependency or handler.
Added
sanitize_clientipkeyword parameter forClientIPScopeOnlyMiddleware,ClientIPMiddlewareandget_ip.sanitize_proxyipkeyword parameter forClientIPScopeOnlyMiddleware,ClientIPMiddlewareandget_ip.
Changed
get_ip()uses now only scope as not keyword-only parameter. The rest did defacto already always use keyword arguments.
0.26.0
Added
- New provider-agnostic
lilya.contrib.aiintegration for building AI-powered Lilya applications. AIClientwith normalized prompt/chat APIs for non-streaming and streaming model interactions.- Typed AI configuration and response objects, including
ChatMessage,PromptRequest,AIResponse,AIResponseChunk, andAIUsage. - Built-in AI provider adapters for OpenAI-compatible APIs, including
OpenAIProvider,GroqProvider,MistralProvider, and the genericOpenAICompatibleProvider. - Built-in
AnthropicProvideradapter for Anthropic's Messages API. setup_ai()startup helper andAIdependency integration for wiring AI clients into Lilya applications throughapp.stateand dependency injection.- New AI contrib documentation with installation steps, full app examples, endpoint recipes, streaming patterns, testing strategies, and provider-switching how-tos.
Changed
- AI contrib documentation now includes more concrete endpoint integration examples, user-facing route patterns, and practical how-to recipes to make adoption clearer in real Lilya applications.
Version 0.25.0
Added
lilya/.agents/skills/SKILL.mdtemplate for creating reusable skills in the Lilya Agents framework.- Expose an alias
OpenAPIQueryforQueryinlilya.contrib.openapito allow using it directly in the OpenAPI documentation.
Changed
- Expose
is_class_and_subclassinlilya.compat. - Expose
import_stringinlilya.compat. - Reorganize internals to remove mypy and validations in favour of
ty. lilya.routingis now a submodule oflilyasplitting the responsibilities of the routing and the path definitions. This allows to have a cleaner separation of concerns and a better internal structure.
The public API is not affected and the imports are still the same but internally.
Version 0.24.3
Fixed
lilya.contrib.openapinow emitsrequestBodyfor writing methods (POST,PUT,PATCH) even whenresponsesare not explicitly declared.@openapi(request_body=...)now supports multipart upload request bodies correctly, including binary fields (format: binary) and propermultipart/form-datacontent generation.BaseTemplateController.render_template()now accepts **kwargs.
Version 0.24.2
Added
TestClient.authenticate(user)andAsyncTestClient.authenticate(user)to allow injecting an authenticated user directly into the ASGI scope during tests.TestClient.logout()andAsyncTestClient.logout()to clear any previously injected authenticated user.- Automatic injection of the authenticated user into both
scope["user"]andscope["state"]["user"]for HTTP and WebSocket connections, enabling clean authentication bypass in tests without monkeypatching.
Fixed
- Settings inheritance now preserves typed fields from parent classes when type hint resolution falls back, allowing child settings classes to override inherited values without re-annotating fields.
Version 0.24.1
Fixed
- Generation of deployment files with the new structure
Changed
- Generated pyproject.toml when using directives
Version 0.24.0
Added
- Performance improvements to the way the system behaves in a fast-path discovery.
Changed
LifespanGlobalContextMiddlewareis no longer activated by default. The reason for this is to avoid overhead in applications
where people do not require the use of theg. You will need to import it into your application now.
from lilya.middleware import DefineMiddleware
from lilya.middleware.global_context import LifespanGlobalContextMiddleware
DefineMiddleware(LifespanGlobalContextMiddleware),Fixed
from future import __annotations__was not being taken into account for the Encoders.- Remove overhead functions that are not used internally. This affected slightly the performance.
- Settings discovery with
settings_modulewas not respecting the hierarchy properly on ChildLilya.
Version 0.23.3
Added
lilya.datastructuresnow supports UploadFile as an alias to DataUpload.@openapidecorator now accepts therequest_bodyas parameter and fixes an issue of getting from responses.
Changed
- Lilya now using the
createprojectdirective instead of generating a requirements folder, generates apyproject.toml
instead. This follows the new Python requirements conventions.
Fixed
lilya createdeploymentdirective files (nginx and docker) updated to the latest stable versions.