skillfed

microversion-parse

OpenStack microversion header parser

microversion-parse v2.1.0 113.1K downloads/30d#12,351 on PyPI
Permissive license Apache-2.0 AGING released

What it is and what it does

microversion_parse is a utility library for handling OpenStack microversion headers—the mechanism by which OpenStack APIs signal backward-compatible feature additions. It provides three core functions: get_version() extracts a version string from HTTP headers (supporting both standard 'OpenStack-API-Version' and legacy service-specific headers), parse_version_string() converts version strings into comparable Version tuples, and extract_version() combines both to validate that a requested version is in the service's supported list. It also includes MicroversionMiddleware, a WSGI middleware component that automatically negotiates microversions for incoming requests, returning appropriate HTTP error responses (406 for unsupported versions, 400 for malformed headers) and injecting the negotiated version into the WSGI environ.

The package is designed for OpenStack service operators and developers building microversion-aware APIs. Its single dependency is WebOb, a lightweight HTTP utility library. It supports Python 3.10 through 3.13 and carries no known security vulnerabilities. The aging maintenance status (last release 253 days ago) suggests the package is stable but not under active development.

Use it for:

  • Validate and extract microversion numbers from incoming OpenStack API requests in a WSGI application.
  • Wrap a microversion-aware WSGI app with middleware to automatically handle version negotiation and return appropriate HTTP responses.
  • Parse and compare microversion strings to determine feature availability within an OpenStack service.
  • Support both modern 'OpenStack-API-Version' headers and legacy service-specific headers like 'X-OpenStack-nova-api-version'.
  • Translate the 'latest' keyword in version requests to the maximum supported version for a service.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses and validates OpenStack microversion headers in HTTP requests, extracting version information for API versioning and providing WSGI middleware for automatic version negotiation.

Yes, if you are building or operating an OpenStack service that needs to handle microversion negotiation. The package is lightweight, has no security issues, and provides a standard way to parse and validate microversions. The aging maintenance status is not a blocker for stable, well-defined functionality, but verify that your OpenStack deployment's microversion requirements match the library's capabilities before adopting it.

Install

microversion-parse on PyPI

pip

pip install microversion-parse

uv

uv add microversion-parse

poetry

poetry add microversion-parse

Installing microversion-parse

Before you install

Low install friction; pure Python wheel with a single runtime dependency on WebOb. Maintenance status is aging (253 days since last release), though the package has been stable since its 2016 inception and supports current Python versions through 3.13.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in commercial and proprietary projects with minimal restrictions beyond attribution and liability disclaimers.

Quickstart

import microversion_parse

headers = {'openstack-api-version': 'compute 2.1'}
version = microversion_parse.get_version(headers, service_type='compute')
# Returns '2.1'

version_tuple = microversion_parse.parse_version_string('2.1')
# Returns comparable Version namedtuple

Requires Python 3.10 or later; WebOb must be installed as a runtime dependency.

Verify before relying

  • Whether the package is actively maintained or in maintenance-only mode given the 253-day release gap.
  • Real-world adoption rate and whether 113,051 monthly downloads reflect active OpenStack deployments or historical usage.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 1 — WebOb
Maintenance aging — 253 days since the last release
First released
Downloads 113,051/month — #12,351 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: microversion_parse-2.1.0-py3-none-any.whl

Environment :: OpenStackIntended Audience :: Information TechnologyIntended Audience :: System AdministratorsLicense :: OSI Approved :: Apache Software LicenseOperating System :: POSIX :: LinuxProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13

Tags

openstack microversion header parserapi version negotiation middlewareopenstack api versioningmicroversion extraction wsgihttp header version parsingopenstack service versioningapi compatibility management
openstackapi-versioningwsgi-middleware

More WWW/HTTP packages