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.