pyramid_blacksmith.middleware_factory¶
Middleware factories.
Create a dedicated blacksmith middleware per request to get the request context purpose in the middleware.
This is usefull to proxify some data from parent request to sub request.
- class pyramid_blacksmith.middleware_factory.AbstractMiddlewareFactoryBuilder(**kwargs: dict[str, bool])¶
Build the factory
- abstract __call__(request: Request) SyncHTTPMiddleware ¶
Called on demand per request to build a client with this middleware
- class pyramid_blacksmith.middleware_factory.ForwardHeaderFactoryBuilder(**kwargs: dict[str, bool])¶
Forward headers (every keys in kwargs)
- Parameters:
kwargs – headers
- __call__(request: Request) SyncHTTPAddHeadersMiddleware ¶
Called on demand per request to build a client with this middleware
- class pyramid_blacksmith.middleware_factory.AcceptLanguageFactoryBuilder(**kwargs: dict[str, bool])¶
Forward the pyramid request locale_name to sub call in a Accept-Language header.
- __call__(request: Request) SyncHTTPAddHeadersMiddleware ¶
Called on demand per request to build a client with this middleware