Releases: dymmond/lilya
Releases · dymmond/lilya
Release list
Version 0.19.1
Changed
- Root path for auto detection behind reverse proxies.
Fixed
- Typo in the error for the security.
- Servers for
openapiwere not being detected automatically.
Version 0.19.0
Added
- Contrib security. This contrib is entirely optional and you don't need to use it but is served as an alternative
to allow you to use Lilya security out of the box.
Fixed
- Nested dependencies that require internal parameters.
- Internals and refactor the OpenAPI spec to match the missing internals.
Changed
- Refactor the
@openapigenerator for security and authorization.
Version 0.18.3
Added
- Lilya being agnostic to everything still has a contrib to integrate with the whole ecosystem so a native AsyncZ
was added to support that same integration in a clean fashion. - New
Contribsection in the documentation to make it clear the separation of concerns.
Version 0.18.2
Added
-
Added support for
Queryparameter markers.- Implemented
aliassupport for query parameters to map custom keys. - Introduced
castfield inQueryfor runtime type coercion with validation. - Improved error handling for missing and invalid query parameter types.
- Implemented
-
Introduced
HeaderandCookieparameter markers withvalue,required, andcastsupport. -
Expanded documentation into a comprehensive “Request Parameters” guide covering declaration, options, and real-world examples for all three types.
Version 0.18.1
Changed
- Update directives to reflect the new settings.
Fixed
- Cache dependency on
jsonnative library.
Version 0.18.0
Added
- Support for native cache with default to
InMemory. - Add support for relative urls from the
URLdatastructure. - Support for OpenAPI on Controllers by applying internal identity descriptors.
Changed
In the past, Lilya was using dataclass to manage all the settings but we found out that can be a bit combersome for a lot
of people that are more used to slighly cleaner interfaces and therefore, the internal API was updated to stop using @dataclass and
use directly a typed Settings object.
- Replace
Settingsto stop using@dataclassand start using direct objects instead.
Example before
from dataclasses import dataclass, field
from lilya.conf.global_settings import Settings
@dataclass
class MyCustomSettings(Settings):
hosts: list[str] = field(default_factory=lambda: ["example.com"])Example after
from lilya.conf.global_settings import Settings
class MyCustomSettings(Settings):
hosts: list[str] = ["example.com"]This makes the code cleaner and readable.
- Apply AnyIO to
DataUploadinstead of using BinaryIO.
Version 0.17.1
Changed
- Dual‑mode support in run_sync: Now accepts either an async function with args or a standalone coroutine object.
- Input normalization: Uses
inspectto detect and wrap calls into a zero‑argument coroutine factory. - Seamless execution: Drives work on the main thread via
anyio.run,
with a clean fallback toThreadPoolExecutorif an event loop is active. - Error clarity: Raises a precise
TypeErrorwhen the argument is neither a coroutine function nor object. - Simplified API: Eliminates nested lambdas by centralizing logic into a single
wrapper_fn
passed toanyio.run.
Version 0.17.0
Added
- Missing validation that was supposed to go on the version 0.16.10 and it was not pushed.
Changed
- Mark
http_exceptionin theExceptionasasyncto avoid thread creation. - Replace
asyncio.iscoroutinefunctionwithinspect.iscoroutinefunction. - Replace
asyncioinrun_syncwith anyio. - Refactor
run_syncfromlilya.compat.
Version 0.16.10
Fixed
infer_bodywith complex dependencies and path params evaluation wheninfer_body=True
Version 0.16.9
Changed
- Unify dependency injection logic for both Controller and handlers.
- Unify logic for body inferring for Controller and handlers.