Esmerald

Latest version: v3.1.3

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

Scan your dependencies

Page 1 of 14

3.1.3

Changed

- Internal support for `hatch` and removed the need for a `Makefile`.
- Internals for Directives. [308](https://github.com/dymmond/esmerald/pull/308) by [devkral](https://github.com/devkral).
- Documentation references and refinements [311](https://github.com/dymmond/esmerald/pull/311) by [paolodina](https://github.com/paolodina).
- `WSGIMiddleware` is now pointing to Lilya.

3.1.2

Fixed

- Regression with `typing_extensions`.

3.1.1

Added

- `--with-basic-controller` flag in `createapp` directive. [PR 284](https://github.com/dymmond/esmerald/pull/284) by [tarsil](https://github.com/tarsil).

Changed

- Documentation improvements.

Fixed

- Typo in the create project directive urls file descripton.
- `operation_id` being generated to include the class based view name when coming from class based views handlers. [PR 289](https://github.com/dymmond/esmerald/pull/289) by [tarsil](https://github.com/tarsil).

3.1.0

Added

- `settings_module` when passed in the instance of Esmerald will take precedence
over the global settings, removing the need of using constantly the `ESMERALD_SETTINGS_MODULE`.
- `ApplicationSettingsMiddleware` as internal that handles with the `settings_module` provided and maps
the context of the settings.

Example of the way the settings are evaluated

python
from esmerald import Esmerald, EsmeraldAPISettings, Gateway, Include, JSONResponse, get, settings


get()
async def home() -> JSONResponse:
return JSONResponse({"title": settings.title})


class NewSettings(EsmeraldAPISettings):
title: str = "Main app"


class NestedAppSettings(EsmeraldAPISettings):
title: str = "Nested app"


app = Esmerald(
settings_module=NewSettings,
routes=[
Gateway("/home", handler=home),
Include(
"/child",
app=Esmerald(
settings_module=NestedAppSettings,
routes=[
Gateway("/home", handler=home),
],
),
),
],
)


In the context of the `controller home`, based on the path being called, it should return the
corresponding value of the `title` according to the settings of the app that is included.

Changed

- `createapp` directive `views.py` file generated renamed to `controllers.py`.
- Make the `EsmeraldAPISettings` hashable.
- Remove `settings_config` in favor of the `settings_module`.
- Bump Lilya version to 0.3.3.
Fixed

- Documentation references. [PR 282](https://github.com/dymmond/esmerald/pull/282) by [DJWOMS](https://github.com/DJWOMS)

3.0.0

Changed

- Moved from beta v3 version to the official v3 of Esmerald fully supporting Lilya.

3.0.0beta2

Added

- Allow the use `from lilya.middleware import Middleware` as alternative to `DefineMiddleware`,

Changed

- Cleaned the `ServerErrorMiddleware` from the lilya import.

Page 1 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.