Skip to content

Releases: dymmond/lilya

Version 0.20.2

Choose a tag to compare

@tarsil tarsil released this 16 Sep 09:31
4df189a

Added

  • is_json and is_form properties for Request.
  • Support for automatic body inference from forms (application/x-www-form-urlencoded and multipart/form-data), in addition to JSON.
  • Complex types with collections, lists, sets, dicts supported by infer_body as True.
  • File uploads (UploadFile and list[UploadFile]) are now seamlessly supported in body inference.
  • Introduced dotted key expansion (user.name=lilya) and bracket list notation (items[0].sku=test) to express nested objects and lists in form submissions.
  • New FormController class based view template that is agnostic to any validation library.

Changed

  • Inferred body to allow the form request to be parsed properly.
  • Improved typed structuring: collections like list[Item], tuple[Item, ...], dict[str, Item], and sets are now properly inferred and converted into typed objects.

Version 0.20.1

Choose a tag to compare

@tarsil tarsil released this 13 Sep 14:59
b422486

Added

Changed

  • Morph path argument into path option and expose it for all commands.
  • Add wrap_dependency for inherited Controller dependencies.

Fixed

  • Properly detect wrapped Lilya instances.
  • Fix crash in show-urls.
  • Fix double initialization of app in runserver.

Breaking

  • lilya runserver loses its path argument. You can specify it via lilya --path foo runserver.

Version 0.20.0

Choose a tag to compare

@tarsil tarsil released this 12 Sep 08:47
44aae34

Added

  • New request‑agnostic Depends for DI anywhere (sync/async, nested deps, overrides, per‑instance caching).
  • Added @Inject decorator to auto‑resolve Depends on call. This preserves signature and honors explicit args.

Example

from lilya.dependencies import Depends, inject


def get_db():
    session = Sessionlocal()
    try:
        yield session
    finally:
        session.close()


@inject
def get_db_session(db = Depends(get_db)) -> Any:
    return db

Version 0.19.8

Choose a tag to compare

@tarsil tarsil released this 09 Sep 21:27
7e9596c

Added

  • Allow using str as handler param for the Path and WebsocketPath as alternative.

Changed

  • RedirectResponse default from 307 to HTTP_303_SEE_OTHER.

Fixed

  • Runserver when no autodiscovery was enabled.
  • Initial settings was not initialising properly in the constructor.
  • Edgy template was being wrongly renamed.

Version 0.19.7

Choose a tag to compare

@tarsil tarsil released this 03 Sep 12:54
4658eb5

Added

  • Compact json for the serializers.

Fixed

  • Query parsing was overriding the default.

Changed

  • Encoders use the native lilya.serializers.serializer object instead of direct json.

Version 0.19.6

Choose a tag to compare

@tarsil tarsil released this 01 Sep 15:39

Added

  • --version attribute when running createapp directive allowing to generate a versioned scaffold.
  • --location attribute when using createapp and createproject directive allowing to specify the location to be created.
  • --edgy attribute to createproject allowing the generation of project scaffolds integrating Edgy ORM.
  • exception method to logging protocol.
  • wrap_dependency internal that will create a Provide in case a dependency is passed and no Provide is provided.
  • Add Jinja2Templates as alias to Jinja2Template.
  • New dynamic, native and fast custom serializers.

Changed

  • To make Lilya cleaner in the installation we have now separated the installation. The Lilya native client
    requires some additional packages and not everyone requires this or even desires but for those already using, the change is simple.

Before

$ pip install lilya

After

$ pip install lilya[standard]

This brings the current behaviour of Lilya prior to version 0.19.6 and nothing changes.

Version 0.19.5

Choose a tag to compare

@tarsil tarsil released this 28 Aug 12:03
8e3f9ed

This is a patch to an old issue where the new settings system was causing booleans to be seen as strings from the loading settings.

Fixed

  • Allow string representation of bool in type check

Version 0.19.4

Choose a tag to compare

@tarsil tarsil released this 27 Aug 13:43
65e346d

Added

  • Support for automatic cast call for a function is a function is provided to cast in the loader of the Environment.
  • UUIDEncoder as a native for parsing UUID types.
  • TimedeltaEncoder as native encoder.

Fixed

  • Fixed @cache when decorating Class controllers and function controllers.
  • Permissions were not properly applied on Controller type objects.
  • Permissions protocol to check for the __is_contoller__.
  • Documentation references.
  • Query was not casting properly boolean values.

Version 0.19.3

Choose a tag to compare

@tarsil tarsil released this 22 Aug 10:25
cfa546e

0.19.3

  • Permission call order was reversed when called from within an Include, Path, Websocket and internal routing.

Version 0.19.2

Choose a tag to compare

@tarsil tarsil released this 22 Aug 08:33
e38cc04

Note

Some small fixes might be released on a normal basis, nothing breaking.

Fixed

  • Nested dependencies where checking values that were not in the signature of the dependency itself.