Releases: dymmond/lilya
Releases · dymmond/lilya
Release list
Version 0.11.0
Changed
- Enhanced encoders:
ENCODER_TYPESis now a context-variable.- New encoders for datetime and date.
- Former
json_encoderis now exported via public API asjson_encode. The old name is still available in_internal. - New method
apply_structure, which allows input parsing. make_responsedoes not support encoders as class anymore only as instance.
Fixed
typing_extensionserrors on python >= 3.10.- Address deprecation warnings in tests.
- Fix encoders applied after simplifying response.
Version 0.10.2
Changed
- Lilya is now BSD-3 licence compliant to protect the developers and mantainers.
Fixed
runserverwas not being application agnostic.
Version 0.10.1
Added
- New
ClientIPMiddlewareadded allowing retrieving IP information directly.
Changed
- The Lilya directives now use Taskfile when generating a project.
Version 0.10.0
Changed
- Rename EnvironmentException to EnvException (but keep old name as alias).
- Drop support for python<3.9.
ENCODER_TYPESare now ordered and new encoders are prepend.
Version 0.9.1
Added
- CORSMiddleware now supports the
allow_private_networksboolean parameter. This prepares
for what is coming for Chromium based browsers.
Changed
- Internal testing for Edgy with the new drivers.
Version 0.9.0
Added
- The new possibility of declaring routes using lilya as decorator.
Example
from lilya.apps import Lilya
from lilya.requests import Request
from lilya.responses import Ok
app = Lilya()
@app.get("/")
async def welcome():
return Ok({"message": "Welcome to Lilya"})
@app.get("/{user}")
async def user(user: str):
return Ok({"message": f"Welcome to Lilya, {user}"})
@app.get("/in-request/{user}")
async def user_in_request(request: Request):
user = request.path_params["user"]
return Ok({"message": f"Welcome to Lilya, {user}"})Version 0.8.3
Changed
- Internal app generator simple now returns async examples by default.
- Update encoding to be
utf-8by default.
Version 0.8.2
This was supposed to in the version 0.8.1
Fixed
- LRU caching affecting connections from request.
Version 0.8.1
Changed
- Removed unused middleware.
- Updated AppSettingsMiddleware for lazy loading
- Updated
globalise_settings.
Fixed
- Performance issues caused by
AppSettingsModule.
Version 0.8.0
Added
XFrameOptionsMiddlewareto handle with options headers.SecurityMiddlewareadding various security headers to the request/response lifecycle.override_settingsas new decorator that allows to override the Lilya settings in any given test.
Fixed
- Missing status
HTTP_301_MOVED_PERMANENTLYfrom the list of available status.