Skip to content

Releases: dymmond/lilya

Version 0.26.1

12 May 23:12
ce629e6

Choose a tag to compare

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

09 Apr 14:09
f18bc9d

Choose a tag to compare

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

03 Mar 23:22
f1c0509

Choose a tag to compare

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

15 Feb 18:22
b8529fb

Choose a tag to compare

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

12 Feb 20:49
e385935

Choose a tag to compare

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

09 Feb 09:32
4b17f8c

Choose a tag to compare

Fixed

  • Generation of deployment files with the new structure

Changed

  • Generated pyproject.toml when using directives

Version 0.24.0

08 Feb 20:02
53002ee

Choose a tag to compare

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

08 Feb 14:36
70f91a3

Choose a tag to compare

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.

Version 0.23.2

25 Jan 16:07
8917300

Choose a tag to compare

  • createproject allows to pass multiple names instead of only one if you want to create multiple projects in one go.
  • createapp allows to pass multiple names instead of only one if you want to create multiple apps in one go.
  • Make Route available as alternative to Path.
  • Make WebSocketRoute available as alternative to WebSocketPath.

Fixed

  • The createproject directive tests was not placing the right contents in conftest.py.
  • When using EnvironLoader() it was causing a conflict with the types and not casting properly to the right type due
    to the from future import __annotations__.

Version 0.23.1

14 Jan 11:01
6ecf096

Choose a tag to compare

Added

  • Introspection graph accessible via app.graph. This is particularly useful if you want to create any
    visuals from your Lilya application or even for framework creators and developers that want to understand in a graph manner, the
    state and internals of the current application.
  • CQRS (Command Query Responsibility Segregation) support under lilya.contrib.cqrs.
  • New CommandBus for dispatching command messages that mutate application state.
  • New QueryBus for executing query messages that return data without side effects.
  • Explicit command and query handler registration with one-handler-per-message enforcement.
  • Optional decorator-based handler registration for quick prototyping.
  • CQRS-scoped middleware pipeline supporting logging, validation, mutation, auditing, and short-circuiting.
  • Message envelopes with metadata support, fully compatible with Lilya encoders (apply_structure, json_encode).
  • Seamless integration with Lilya endpoints, requests, responses, routing, and TestClient.