dj_blacksmith

class dj_blacksmith.AsyncAbstractMiddlewareFactoryBuilder(settings: Mapping[str, Any])

Build the factory

abstract __call__(request: HttpRequest) AsyncHTTPMiddleware

Called on demand per request to build a client with this middleware

class dj_blacksmith.AsyncCircuitBreakerMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build Circuit Breaker Middleware.

build() AsyncHTTPMiddleware

Build the middleware from the settings, optionnaly use the metrics.

class dj_blacksmith.AsyncForwardHeaderFactoryBuilder(settings: Mapping[str, Any])

Forward headers (every keys in kwargs)

Parameters:

kwargs – headers

__call__(request: HttpRequest) AsyncHTTPAddHeadersMiddleware

Called on demand per request to build a client with this middleware

class dj_blacksmith.AsyncHTTPCacheMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build HTTP Cache Middleware.

build() AsyncHTTPCacheMiddleware

Build the middleware from the settings, optionnaly use the metrics.

class dj_blacksmith.AsyncPrometheusMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build Prometheus Middleware.

build() AsyncPrometheusMiddleware

Build the middleware from the settings, optionnaly use the metrics.

class dj_blacksmith.SyncAbstractMiddlewareFactoryBuilder(settings: Mapping[str, Any])

Build the factory

abstract __call__(request: HttpRequest) SyncHTTPMiddleware

Called on demand per request to build a client with this middleware

class dj_blacksmith.SyncCircuitBreakerMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build Circuit Breaker Middleware.

build() SyncHTTPMiddleware

Build the middleware from the settings, optionnaly use the metrics.

class dj_blacksmith.SyncForwardHeaderFactoryBuilder(settings: Mapping[str, Any])

Forward headers (every keys in kwargs)

Parameters:

kwargs – headers

__call__(request: HttpRequest) SyncHTTPAddHeadersMiddleware

Called on demand per request to build a client with this middleware

class dj_blacksmith.SyncHTTPCacheMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build HTTP Cache Middleware.

build() SyncHTTPCacheMiddleware

Build the middleware from the settings, optionnaly use the metrics.

class dj_blacksmith.SyncPrometheusMiddlewareBuilder(settings: Mapping[str, Any], metrics: PrometheusMetrics)

Build Prometheus Middleware.

build() SyncPrometheusMiddleware

Build the middleware from the settings, optionnaly use the metrics.