Esmerald

Latest version: v3.1.5

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

Scan your dependencies

Page 1 of 14

3.1.5

Added

This change was supposed to be shipped in the version [3.1.4](314) but it missed the release.

- Printing the stack trace when an Esmerald application is in `debug=True` providing a deeper
level of understanding the source of the errors.

3.1.4

Fixed

- AsyncExitMiddleware raising exception.
- OpenAPI error when generating the parameters with dependencies.
- OpenAPI security schemes.

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)

Page 1 of 14

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.