--- id: oslo-middleware version: "8.2.0" license: Apache-2.0 license_treatment: permissive maintenance: active --- # oslo.middleware — Oslo Middleware library License: permissive · Maintenance: active · Downloads: 382.6K/mo ## What it is and what it does oslo.middleware is an OpenStack library that provides a base class and utilities for building WSGI middleware components. It allows developers to inject custom logic into the request/response pipeline of WSGI applications, enabling tasks like HTTP header manipulation, request/response filtering, and connection management. The library is part of the Oslo project and integrates with other Oslo libraries (oslo.config, oslo.context, oslo.i18n, oslo.utils) to provide configuration, context tracking, and internationalization support. The package is intended for OpenStack developers and operators who need to customize request/response handling in their applications. It abstracts away boilerplate WSGI middleware code and provides hooks for common operations. With support for Python 3.11 through 3.14 and an active maintenance status, it is suitable for modern OpenStack deployments. The library depends on WebOb for HTTP request/response objects and stevedore for plugin management. Use it for: - Add custom HTTP headers or modify existing ones in requests and responses across an OpenStack application. - Implement request/response logging, timing, or metrics collection via the statsd dependency. - Enforce connection limits or request size restrictions at the middleware layer. - Integrate authentication or authorization checks into the request pipeline. - Localize or internationalize responses using oslo.i18n integration. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. oslo.middleware provides WSGI middleware components for intercepting and modifying HTTP request/response flows in OpenStack applications, with support for header manipulation, connection limiting, and custom request/response processing. Yes, if you are developing or operating an OpenStack application and need to customize request/response handling. The low install friction, active maintenance, permissive license, and tight integration with Oslo libraries make it a natural fit for OpenStack deployments. Not necessary for non-OpenStack WSGI applications, where other middleware libraries may be more appropriate. ## Install pip install oslo-middleware uv add oslo-middleware poetry add oslo-middleware ## Installing oslo.middleware Before you install: Low install friction with a pure-Python wheel distribution. Actively maintained with a release 35 days ago. Depends on 11 runtime packages including oslo.config, oslo.context, and WebOb—all standard OpenStack ecosystem libraries. License in practice: Apache-2.0 permissive license allows commercial and private use with minimal restrictions, making it suitable for proprietary OpenStack deployments. Quickstart: pip install oslo.middleware from oslo_middleware import base class CustomMiddleware(base.ConfigurableMiddleware): def process_request(self, req): # Intercept and modify request return req def process_response(self, response): # Intercept and modify response return response Requires Python 3.11 or later; designed for integration into WSGI application pipelines, not standalone use. Verify before relying: - Whether the package includes pre-built middleware for common tasks (e.g., CORS, rate limiting) beyond the base class. - Performance characteristics when handling high request volumes or large payloads. ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 382.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags WSGI middleware components, HTTP request response interceptor, OpenStack middleware library, header manipulation middleware, connection limiting middleware, request response pipeline, openstack, wsgi-middleware [View on SkillFed](https://skillfed.io/packages/oslo-middleware) · [View on PyPI](https://pypi.org/project/oslo-middleware/)