Skip to content

Releases: dymmond/lilya

Version 0.27.0

Choose a tag to compare

@tarsil tarsil released this 05 Jul 10:50
6a739e1

Added

  • First-class support for the HTTP QUERY method standardized by RFC 10008, including route registration with methods=["QUERY"], @app.query() decorators, controller dispatch, middleware visibility, and client helpers.
  • QUERY request 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 QUERY instead of GET or POST, request bodies, OpenAPI behavior, and client/proxy caveats.

Changed

  • OpenAPI schema generation and documentation surfaces now default to OpenAPI 3.2.0.
  • CSRFMiddleware treats QUERY as a safe method by default.
  • CORSMiddleware(allow_methods=["*"]) now includes QUERY.

Version 0.26.2

Choose a tag to compare

@tarsil tarsil released this 27 May 16:18
b213a26

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 like list[str | int | dict[str, str]].
  • cast=list now 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

Choose a tag to compare

@tarsil tarsil released this 12 May 23:12
ce629e6

Added

  • unique_identifier field for UserInterface. This is required for tracking authenticated users in libraries.
  • infer_body can now be passed in a Lilya instance 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_clientip keyword parameter for ClientIPScopeOnlyMiddleware, ClientIPMiddleware and get_ip.
  • sanitize_proxyip keyword parameter for ClientIPScopeOnlyMiddleware, ClientIPMiddleware and get_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

Choose a tag to compare

@tarsil tarsil released this 09 Apr 14:09
f18bc9d

Added

  • New provider-agnostic lilya.contrib.ai integration for building AI-powered Lilya applications.
  • AIClient with normalized prompt/chat APIs for non-streaming and streaming model interactions.
  • Typed AI configuration and response objects, including ChatMessage, PromptRequest, AIResponse, AIResponseChunk, and AIUsage.
  • Built-in AI provider adapters for OpenAI-compatible APIs, including OpenAIProvider, GroqProvider, MistralProvider, and the generic OpenAICompatibleProvider.
  • Built-in AnthropicProvider adapter for Anthropic's Messages API.
  • setup_ai() startup helper and AI dependency integration for wiring AI clients into Lilya applications through app.state and 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

Choose a tag to compare

@tarsil tarsil released this 03 Mar 23:22
f1c0509

Added

  • lilya/.agents/skills/SKILL.md template for creating reusable skills in the Lilya Agents framework.
  • Expose an alias OpenAPIQuery for Query in lilya.contrib.openapi to allow using it directly in the OpenAPI documentation.

Changed

  • Expose is_class_and_subclass in lilya.compat.
  • Expose import_string in lilya.compat.
  • Reorganize internals to remove mypy and validations in favour of ty.
  • lilya.routing is now a submodule of lilya splitting 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

Choose a tag to compare

@tarsil tarsil released this 15 Feb 18:22
b8529fb

Fixed

  • lilya.contrib.openapi now emits requestBody for writing methods (POST, PUT, PATCH) even when responses are not explicitly declared.
  • @openapi(request_body=...) now supports multipart upload request bodies correctly, including binary fields (format: binary) and proper multipart/form-data content generation.
  • BaseTemplateController.render_template() now accepts **kwargs.

Version 0.24.2

Choose a tag to compare

@tarsil tarsil released this 12 Feb 20:49
e385935

Added

  • TestClient.authenticate(user) and AsyncTestClient.authenticate(user) to allow injecting an authenticated user directly into the ASGI scope during tests.
  • TestClient.logout() and AsyncTestClient.logout() to clear any previously injected authenticated user.
  • Automatic injection of the authenticated user into both scope["user"] and scope["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

Choose a tag to compare

@tarsil tarsil released this 09 Feb 09:32
4b17f8c

Fixed

  • Generation of deployment files with the new structure

Changed

  • Generated pyproject.toml when using directives

Version 0.24.0

Choose a tag to compare

@tarsil tarsil released this 08 Feb 20:02
53002ee

Added

  • Performance improvements to the way the system behaves in a fast-path discovery.

Changed

  • LifespanGlobalContextMiddleware is no longer activated by default. The reason for this is to avoid overhead in applications
    where people do not require the use of the g. 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_module was not respecting the hierarchy properly on ChildLilya.

Version 0.23.3

Choose a tag to compare

@tarsil tarsil released this 08 Feb 14:36
70f91a3

Added

  • lilya.datastructures now supports UploadFile as an alias to DataUpload.
  • @openapi decorator now accepts the request_body as parameter and fixes an issue of getting from responses.

Changed

  • Lilya now using the createproject directive instead of generating a requirements folder, generates a pyproject.toml
    instead. This follows the new Python requirements conventions.

Fixed

  • lilya createdeployment directive files (nginx and docker) updated to the latest stable versions.