Skip to content

Version 0.18.0

Choose a tag to compare

@tarsil tarsil released this 21 Jul 16:25
ee1ad41

Added

  • Support for native cache with default to InMemory.
  • Add support for relative urls from the URL datastructure.
  • 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 Settings to stop using @dataclass and 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 DataUpload instead of using BinaryIO.