Skip to content

Releases: dymmond/esmerald

Version 3.3.6

08 Aug 13:18
cfd9dc0
Compare
Choose a tag to compare

Added

  • allow_private_networks property to CORSMiddleware.

Changed

  • Gateway now allows to pass also an optional operation_id as parameter for OpenAPI documentation allowing
    multiple gateways to use the same handler and being recognised automatically by OpenAPI documentation.
  • OpenAPI documentation when multiple gateways use the same handler and no operation_id is declared,
    automatically tries to generate a unique operation_id for it.
  • Internal code organisation for class based View to generate the routes in one place and reducing
    code duplication.
  • Updated internal testing requirements for Edgy and Saffier and Lilya.

Version 3.3.5

03 Aug 16:41
e2618b7
Compare
Choose a tag to compare

This was missed from the release 3.3.4 and it was supposed to be included.

Added

  • Native types for Esmerald transformer models/
  • Hashing list internally for the signature allowing lists to be declared for OpenAPI representation.

Changed

  • Query parameters when declared as list, List, dict and Dict automatically parses the values
    to the declared type.
  • OpenAPI understands the native types, objects and lists (arrays).

Version 3.3.4

01 Aug 17:44
a15908d
Compare
Choose a tag to compare

Added

  • Missing documentation for Query Parameters and Path Parameters.

Changed

  • Documentation for Extra, Advanced && Useful is now renamed Advanced & Useful and its located in the Features
    section.
  • Removed unused internal functions for validations now used by Esmerald encoders.

Fixed

  • Regression caused by the introduction of the dynamic encoders when diplaying the query parameters in the OpenAPI
    documentation.
  • Annotation discovery for the Signature.

Version 3.3.3

29 Jul 14:45
419dc7d
Compare
Choose a tag to compare

Changed

  • Internal implementation of the exceptions.
  • Removed redundant exception declaration and delegate the internals to Lilya.
  • Internal code cleaning.

Added

  • ValidationError for custom independent raising exceptions within any Esmerald application

Fixed

  • is_server_error for dependencies was causing an exception to be raised in a loc[-1].

Version 3.3.2

27 Jul 11:41
cf38c1f
Compare
Choose a tag to compare

Changed

  • Update the internals of contrib for Asyncz to match the new Asyncz specifications and API.

Version 3.3.1

22 Jul 09:57
928ceb1
Compare
Choose a tag to compare

Changed

  • Automatic detection of a response for a default status code when using OpenAPI documentation.
  • Addressing from __future__ import annotation when using the dependency injection defaulting to Any.

Version 3.3.0

17 Jul 16:27
db7d07a
Compare
Choose a tag to compare

Fixed

  • Fixes PydanticEncoder when checking for subclasses of BaseModel causing the dependency injection to fail
    for those specific types

Added

  • Esmerald is ow using python-slugify instead of awesome-slugify for internals.
  • OpenAPI Schemas Pydantic is now fully integrated with Esmerald OpenAPI.
  • Esmerald now supports app as decorator prodiving another way of declaring the routing.

Example

#!/usr/bin/env python
import uvicorn

from esmerald import Esmerald, Gateway, JSONResponse, Request, get


app = Esmerald()


@app.get("/esmerald")
def welcome() -> JSONResponse:
    return JSONResponse({"message": "Welcome to Esmerald"})


@app.get("/esmerald/{user}")
def user(user: str) -> JSONResponse:
    return JSONResponse({"message": f"Welcome to Esmerald, {user}"})


@app.get("/esmerald/in-request/{user}")
def user_in_request(request: Request) -> JSONResponse:
    user = request.path_params["user"]
    return JSONResponse({"message": f"Welcome to Esmerald, {user}"})


if __name__ == "__main__":
    uvicorn.run(app, port=8000)

The same is also applied to the Router object.

Version 3.2.7

02 Jul 22:06
af10e6f
Compare
Choose a tag to compare

Changed

  • Removed unused middleware.
  • Updated AppSettingsMiddleware for lazy loading
  • Updated globalise_settings.

Fixed

  • Performance issues caused by AppSettingsModule.

Version 3.2.6

02 Jul 21:34
20f1bdc
Compare
Choose a tag to compare

Added

  • XFrameOptionsMiddleware to handle with options headers.
  • SecurityMiddleware adding various security headers to the request/response lifecycle.
  • override_settings as new decorator that allows to override the Lilya settings in any given test.
  • New --simple flag for createproject directive generating simple structured projects.
  • Integration with new rapidoc as another alternative to display the OpenAPI docs.

Changed

  • Internal asyncz decorator inside a wrapper.
  • Updated pydantic an lilya requirements.

Version 3.2.5

14 Jun 21:28
f5037df
Compare
Choose a tag to compare

Fixed

  • Added missing options into get_scheduler of AsynczConfig.