Releases: dymmond/lilya
Releases · dymmond/lilya
Release list
Version 0.20.2
Added
is_jsonandis_formproperties forRequest.- 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_bodyas 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
Added
Changed
- Morph path argument into path option and expose it for all commands.
- Add
wrap_dependencyfor 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
Added
- New request‑agnostic Depends for DI anywhere (sync/async, nested deps, overrides, per‑instance caching).
- Added @Inject decorator to auto‑resolve
Dependson 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 dbVersion 0.19.8
Added
- Allow using
strashandlerparam for thePathandWebsocketPathas alternative.
Changed
RedirectResponsedefault from 307 toHTTP_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
Added
- Compact json for the serializers.
Fixed
Queryparsing was overriding the default.
Changed
Encodersuse the nativelilya.serializers.serializerobject instead of directjson.
Version 0.19.6
Added
--versionattribute when runningcreateappdirective allowing to generate a versioned scaffold.--locationattribute when usingcreateappandcreateprojectdirective allowing to specify the location to be created.--edgyattribute tocreateprojectallowing the generation of project scaffolds integrating Edgy ORM.exceptionmethod to logging protocol.wrap_dependencyinternal that will create aProvidein case a dependency is passed and noProvideis provided.- Add
Jinja2Templatesas alias toJinja2Template. - 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 lilyaAfter
$ pip install lilya[standard]This brings the current behaviour of Lilya prior to version 0.19.6 and nothing changes.
Version 0.19.5
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
Added
- Support for automatic cast call for a function is a function is provided to cast in the
loaderof the Environment. UUIDEncoderas a native for parsingUUIDtypes.TimedeltaEncoderas native encoder.
Fixed
- Fixed
@cachewhen decorating Class controllers and function controllers. - Permissions were not properly applied on
Controllertype objects. - Permissions protocol to check for the
__is_contoller__. - Documentation references.
Querywas not casting properly boolean values.
Version 0.19.3
0.19.3
- Permission call order was reversed when called from within an Include, Path, Websocket and internal routing.
Version 0.19.2
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.