esmerald

Esmerald framework - Highly scalable, performant, easy to learn, easy to code and for every sizeable and complex application

MIT License

Downloads
14.8K
Stars
297
Committers
14

Bot releases are visible (Hide)

esmerald - Version 3.1.3

Published by tarsil 6 months ago

Changed

  • Internal support for hatch and removed the need for a Makefile.
  • Internals for Directives. #308 by @devkral.
  • Documentation references and refinements #311 by @paolodina.
  • WSGIMiddleware is now pointing to Lilya.
esmerald - Version 3.1.2

Published by tarsil 6 months ago

Fixed

  • Regression with typing_extensions.
esmerald - Version 3.1.1

Published by tarsil 6 months ago

Added

  • --with-basic-controller flag in createapp directive. #PR 284 by @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 by @tarsil.
esmerald - Version 3.1.0

Published by tarsil 7 months ago

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

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

esmerald - Version 3.0.0

Published by tarsil 7 months ago

Changed

  • Moved from beta v3 version to the official v3 of Esmerald fully supporting Lilya.
esmerald - Version 3.0.0b2

Published by tarsil 7 months ago

Added

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

Changed

  • Cleaned the ServerErrorMiddleware from the lilya import.
esmerald - Version 3.0.0b1

Published by tarsil 7 months ago

!!! Warning
This is a major release and it will be under the the version 3 of Esmerald.
You should not be affected but in case you are, please report any issues
so we can correct it.

Added

  • Support for Lilya and drop Starlette.

Changed

  • CSRFConfig cookie_secure renamed to secure.
  • CSRFConfig httponly renamed to httponly.
  • CSRFConfig cookie_samesite renamed to samesite.
  • CSRFConfig cookie_domain renamed to domain.
  • CSRFConfig cookie_secure renamed to secure.
  • Removed support for the BasicMiddleware as this can be imported from any other ASGI application.

Internal

In the past, Middleware was being used but with the introduction of Lilya, now is DefineMiddleware that
is applied.

from lilya.middleware import DefineMiddleware
  • The PlainTextResponse was renamed to PlainText.
esmerald - Version 2.7.4

Published by tarsil 8 months ago

Fixed

  • WSGIMiddleware optional was being called in the core middlewares.
esmerald - Version 2.7.3

Published by tarsil 8 months ago

Added

  • Allowing app to load as a string as alternative to an object inside the Include

Changed

  • Internal code for lazy objects.
  • Make a2wsgi optional for WSGIMiddleware.
  • httpx is now only a depedency for testing.
  • Cleared some core dependencies.
esmerald - Version 2.7.2

Published by tarsil 9 months ago

Changed

  • Security update for python multipart.
  • Update minimum Starlette requirement.
esmerald - Version 2.7.1

Published by tarsil 9 months ago

Added

  • settings_module as replacement for settings_config.
  • Deprecation warning for settings_config in favour of settings_module parameter.

Changed

  • Added improvements to the scaffold generated by esmerald createproject in the tests.
  • Added extra origin type for when a MsgSpec Struct is passed in the payload of a handler.

Fixed

  • OpenAPI Tags not loading from top down if handler had tags=None.
  • TestClient to allow passing pluggables inside create_client.
esmerald - Version 2.7.0

Published by tarsil 9 months ago

Changed

  • Token.decode() is now a classmethod. This allows to subclass the Token and add extra fields into the model
    allowing operations like encode() with extra claims. This can be useful for situations like claiming a refresh or access token.
  • Internal handlers decorators are now wrapped in a function decorator. This does not affect anything but allows more control over the middleware
    calls to async ASGI applications.

Fixed

  • OpenAPI when overriding the response for the default status codes of the handlers.
esmerald - 2.6.0

Published by tarsil 9 months ago

Added

  • New createdeployment directive allowing
    the generation of deployment scaffolds for any Esmerald project.

Changed

  • Added requirements to the createproject directive generating the minimum requirements
    for an Esmerald project.

Fixed

  • BaseAuthentication for self.app when its of the type of HTTPHandler and WebSocketHandler.
esmerald - Version 2.5.0

Published by tarsil 9 months ago

Changed

  • Upgraded internal dependencies.
  • The internals for the middleware are now delegated to Starlette directly.
  • Middlewares of Gateway and WebSocket Gateways are now delegated to Starlette.

Fixed

  • Internals to be compliant with new version of Starlette.
  • Building middleware stack for the Middleware object.
  • Internal testing to reflect the new way of the Include to be compliant with the ASGI spec.
esmerald - Version 2.4.3

Published by tarsil 11 months ago

Fixed

  • OpenAPI contact it was not parsing properly on transformation.
  • Rename include attribute from Param (base) and call include_in_schema.
  • Missing nest_asyncio dependency when using esmerald shell.
esmerald - Version 2.4.2

Published by tarsil 11 months ago

Changed

  • Pin starlette version to 0.32.0.post1
esmerald - Version 2.4.1

Published by tarsil 11 months ago

Fix

  • Regression when performing a model_dump of pydantic models in the responses.
  • Re-enable orjson for generic response parsing.
esmerald - Version 2.4.0

Published by tarsil 12 months ago

Changed

  • Updated SwaggerUI version.
  • Updated responses with a msgspec response example.

Added

  • Support for payload as alternative to data. This aims
    to make the process more intuitive and easy to implement. #199.
  • Context - The new context object for the handlers.
  • Support for msgspec natively allowing to have more than just Pydantic.

!!! Note
Esmerald is not fully tight with Pydantic which means it's more flexible and extendible and allows more versatility.

Fixed

  • Missing Request document.
  • Removed the use of random for the secrets in favour of the secrets library instead.
  • Contrib documentation updates regarding the Authorization headers.
esmerald - Version 2.3.1

Published by tarsil 12 months ago

Fixed

  • Middleware as an independent ASGI app on an Include level.

!!! Warning
This was supposed to go in the release 2.3.0 but it was not merged on time to make the
release.

esmerald - Version 2.3.0

Published by tarsil 12 months ago

Changed

  • OpenAPI fields are permanently moved to OpenAPIConfig
    making the codebase cleaner. The options are still available via settings in case of wanting to
    override the defaults but not via instantiation parameters. Via instantiation the OpenAPIConfig is the
    one to be used.

!!! Warning
This is a breaking change. The functionality itself still works as it is supposed to but from now on
instead of passing via Esmerald instance, you need to pass the variables via OpenAPIConfig.
object instead.

Added

  • Annotated for documentation genetators.
  • Add new documentation structure for Esmerald base.
  • Add API Reference . #196

Fixed

  • Allow tags for levels. When a tag is added to an Include, Gateway, or any other level,
    the tags are appended to the final handler. This allows inheriting from existing tags for OpenAPI.
  • Middleware on levels treating each level as an independent ASGI app.