Esmerald

Latest version: v3.5.0

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

Scan your dependencies

Page 9 of 18

2.0.4

Changed

- Updated functional internal crypto to only use the system random.
- Cleaner codebase for the application settings.
- Updated version of Asyncz to be at least 0.5.0.

Added

- Custom exception handlers, `from esmerald.exception_handlers import value_error_handler`.
- New native exception handler for pydantic v2 Validation errors in general.
- Dataclasses (normal and Pydantic dataclases) are now supported as Esmerald Responses.
- Support for [OpenAPI Webhooks](./routing/webhooks.md).
- Improved [Responses](./responses.md) documentation with examples using Pydantic BaseModel and dataclasses.
- OpenAPI Spotlight Elements documentation. When starting the application, accesing the default `/docs/elements`.
- Support for [Edgy](https://edgy.tarsild.io) ORM. [Docs here](https://esmerald.dev/databases/edgy/motivation/).

Fixed

- Removed old pydantic v1 syntax from tests and applications.
- `add_include()` that wasn't generating signature models upon import.
- OpenAPI query params with defaults weren't loading properly.

2.0.3

This addition was supposed to go in the release [2.0.2](202) but somehow it was missed in the merge of
the pull requests. It is not a bug fix but instead is a simple new
[directive](https://esmerald.dev/directives/shell) that can be useful for those who like using the command-line.
It is important to understand that this support **won't be available on releases** of Esmerald
1.X.

Added

- [Interactive shell](https://esmerald.dev/directives/shell) support directive for any Esmerald application.

2.0.2

Changed

- Updated Field, Form and Body from `esmerald.params` with current defaults.
- Removed redundant cast from `File` to `Body` as it is a subclass.

Added

- Added `strict` and `max_digits` esmerald params `esmerald.params`.
- Deprecate `example` as OpenAPI 3.10 supports `examples`. Use examples instead of `example`.

Fixed

- [UploadFile](https://esmerald.dev/extras/upload-files/?h=upload#uploadfile) sending as a list and as normal.
This got broken when the migration to pydantic 2.0 happened.
- `File` and `Form` from `esmerald.params` now accept `annotation`.
- OpenAPI for `UploadFile` as single and list now being parsed as a model.

2.0.1

This is a small fix into the parser of lists for the OpenAPI specification.

Fixed

- [OpenAPIResponse](https://esmerald.dev/responses#openapi-responses) now allows proper parse of lists as definition. [More details](https://esmerald.dev/responses/#lists).

2.0.0

!!! Warning
When upgrading Esmerald to version 2, this also means the use of Pydantic 2.0 at its core as well as corresponsing technologies
already updated to version 2 of Pydantic (Saffier, Asyncz...).
If you still wish to continue to use Pydantic 1 with Esmerald, it is recommended to use Esmerald prior to version 2.0 which it will
be maintained for a shor period but we **strongly recommend to always use the latest version**.

Changed

- **Major update of the core of Esmerald from Pydantic v1 to Pydantic v2.**
- Changed deprecated functions such as `validator` and `root_validator` to `field_validator` and `model_validator`.
- Transformers no longer support custom fields. Pydantic natively handles that.
- EsmeraldSignature updated for the new version of the FieldInfo.
- `params` reflect the new Pydantic FieldInfo.
- Deprecated OpenAPIView in favour of the new OpenAPI documentation generator.
- Changed OpenAPI config to reflect the new generation of OpenAPI documentation.
- Internal data field is now returning Body type parameter making it easier to integrate with Pydantic 2.0.
- General codebase cleanup.
- Removed old OpenAPI document generator in favour to the newest, fastest, simplest and more effective approach in v2.
- Remove the support of pydantic 1.0. Esmerald 2+ will only support pydantic 2+.

Added

- OpenAPI support for OAuth2.

1.3.0

Changed

- OpenAPI imports and removed unused dependencies.
- Deprecate `pydantic_factories` in favour of `pyfactories`.
- Dropped support for Tortoise ORM natively.

Fixed

- Rename `scripts/format` to `scripts/lint` for consistency.
- `get_hasher` from contrib fixed with the return value of the algorithm.
- Typing of the codebase updated.

Page 9 of 18

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.