Esmerald

Latest version: v3.7.0

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

Scan your dependencies

Page 1 of 19

3.7.0

Added

- Decorator `controller`. This decorator allows to, as the name suggests, create a controller from
a normal python objects. This is a simple way of creating a controller without the need of subclassing the `Controller` class.
- [Decorators](https://esmerald.dev/decorators) documentation section with the available Esmerald decorators.
- Support for [**native** caching](https://esmerald.dev/caching) with support for custom backends.
- [Observables](https://esmerald.dev/observables.md) documentation section. This is a new feature that allows to create
observables that can be used to create a more reactive programming style.

Example

python
from esmerald.utils.decorators import controller
from esmerald import get, post

controller(path="/items")
class ItemHandler:

get("/{item_id}")
async def get_item(self, item_id: int) -> dict:
return {"item_id": item_id}

post("/")
async def create_item(self, data: dict) -> dict:
return {"message": "Item created", "data": data}


The rest remains as per normal usage of Esmerald.

3.6.8

Added

- Esmerald now allows the import of Lilya EnvironLoader directly using it directly via:

python
from esmerald.utils.environments import EnvironmentLoader


- [Factory](https://esmerald.dev/dependencies.md) now accepts `kwargs` parameters.
- You can now declare dependencies [without using explicitly the `Inject()`](https://esmerald.dev/dependencies/#use-without-inject).

Changed

- Event lifecycle fully delegated to Lilya internals removing duplication.
- Cleanup internals for the path and delegate to Lilya.
- Background tasks pointing 100% to Lilya.
- Moved `concurrecy` to `esmerald.utils.concurrency`.
- Moved `esmerald.enums` to `esmerald.utils.enums`.
- Refactored `parse_form_data` from `esmerald.parsers` into a cleaner version.

Fixed

- Documentation pointing to the state of the CI.

Removed

- Official support for Mako template engine as previously announced.

3.6.7

Added
- `before_request` and `after_request` WebSocketGateway handler added.
- `before_request` and `after_request` added as default to the settings. This was not required
as the settings loading system of Esmerald defaults values but this should be added to the settings
for consistency reasons of the framework.
Changed

- Reverse order on Gateway `after_request`.

Fixed

- `override_settings` was not taking into account async functions.

3.6.6

Added

- `Esmerald`, `Include`, `Host`, `Gateway`, `HTTPHandler` and `Router` now support `before_request` and `after_request`
life cycles. This can be particularly useful to those who want to perform actions before and after
a request is performed. E.g.: Telemetry.
- Missing before and after request in the handler helpers.
- `BaseController` alias for the `View`. This serves a preparation for the internal renaming.

Fixed

- Internal permission checking for Lilya and Esmerald was not extended to `View` base of Controllers.
- Inheritance extending previous permissions on Controllers.

3.6.5

Added

- Esmerald now **also** supports **Pure ASGI Permissions**. That means you can pass the same
style of permissions as the ones used in Lilya as alternative to the native Esmerald permission
system.
- New [Lilya permissions](https://lilya.dev/permissions/lilya.md) documentation section.

Changed

- [Permissions section](https://lilya.dev/permissions/esmerald.md) moved and renamed to Esmerald Permissions.

Fixed

- `set_cookie` was causing an issue when multiple were being generated.

3.6.4

Added

- Support for `async` jinja templates.
- Missing `esmerald --version` command to the cli.

Changed

- Removed hard dependency of `nest_asyncio`.
- Use ORJSON as parsing json.

Fixed

- Internal pattern for OAuth2 form password.
- Fixed internal typings of passthrough in Response and TemplateResponse.
- Esmerald permissions on Include were being overriten by Lilya too early.

Page 1 of 19

© 2025 Safety CLI Cybersecurity Inc. All Rights Reserved.