Lilya

Latest version: v0.12.10

Safety actively analyzes 714815 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 3 of 10

0.11.10

Not secure
Added

- Add `passthrough_body_types` for passing memoryviews and bytearrays directly to the application server.

Changed

- TestClient validates more ASGI conformance. It raises an `ASGISpecViolation` error for spec violations when `check_asgi_conformance` is True (default).
- Response's `make_headers` now set `headers` directly.
- Response's `headers` is now a attribute.
- Response's `raw_headers` is now an alias for `encoded_headers`.

Fixed

- Ensure the response output is bytes when not `passthrough_body_types` is set. Defaults to passing through bytes.
- Properly handle bytearrays.
- Properly parse header values. Properly handle cases in which header values are passed as an array in a dictionary.
- Properly set cookies.

0.11.9

Not secure
Added

- Add `session_serializer`, `session_deserializer` parameters to `SessionMiddleware`.

Changed

- Refactor `SessionMiddleware`.
- Refactor authentication.
- Allow multiple backends in `AuthenticationMiddleware`.
- Move backend logic from `BaseAuthMiddleware` to `AuthenticationMiddleware`. Matches documentation.
- Rename BaseUser to UserInterface and make it a protocol. Note: the old name is still available for compatibility reasons.
- Remove undocumented stub definitions from UserInterface. They were unsound.

Fixed

- Authentication documentation referenced non-existing structures.
- Available middleware section in middleware.md was not up to date.
- Fix serialization of primitives in the Response. Strip `"` by default.

0.11.8

Not secure
Fixed

- Fix too strict json_encoder_fn enforcment.
- Fix empty [] and {} becoming incorrectly an empty response in json context.

0.11.7

Not secure
Added

- Add bytes encoder to encoders.
- Allow using DefineMiddleware and DefinePermission with import strings.

Changed

- Move simplify logic from `make_response` to Response but keep old interface.
- Move esmerald Response `transform` to lilya.

Fixed

- Fix unnecessary roundtrip in JSONResponse.

0.11.6

Not secure
Added

- Add `redirect` function as a wrapper to return `ResponseRedirect` responses. Import happens
inside `lilya.responses import redirect`.

Changed

- Make `g` object automatically managed by Lilya middleware. You no longet need to import the
`GlobalContextMiddleware` as it is a default Lilya middleware.

0.11.5

Not secure
Added

- `RequestContextMiddleware` added allowing request objects being used without a context of a request
without explicitly declaring it inside handlers.

Changed

- Allow multiple directories in `StaticFiles`. This enables providing overwrites/defaults.

Page 3 of 10

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.