Registry / http-networking / microversion-parse

microversion-parse

JSON →
library2.1.0pypypi✓ verified 80d ago

Library for parsing OpenStack microversion headers from HTTP requests. Version 2.1.0, supports Python >=3.10. Actively maintained, part of the OpenStack project. Release cadence follows OpenStack cycles.

pip install microversion-parse
INSTALL
IMPORT
SIG · MICROVERSION-PARSE
M
microversion-parse
http-networkingpythonv2.1.0
Install
1.7s avg
Import
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v2.1.0 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 18.9MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.7s · import 0.000s · 19MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

parse_version_string
from microversion_parse import parse_version_string
from microversion_parse import parse_version
Version
from microversion_parse import Version
get_version
from microversion_parse import get_version

Parse microversion from request headers or version strings.

from microversion_parse import parse_version, parse_version_string from webob import Request # Example with a WebOb request req = Request.blank('/', headers={'OpenStack-API-Version': 'compute 2.1'}) version = parse_version(req, 'compute') print(version) # ('compute', 2, 1) # Parse a version string directly ver = parse_version_string('compute 2.1') print(ver) # ('compute', 2, 1)
Debug
Known issues
breakingIn version 2.0.0, the package was renamed from 'microversion_parse' (underscore) to 'microversion-parse' (hyphen). The import path remains 'microversion_parse' (underscore).
fix
Update from pip package 'microversion_parse' to 'microversion-parse'. Import path unchanged.
affects: <2.0.0
gotchaThe library expects the version header to be in the format '<service-type> <major>.<minor>'. Missing space or wrong format raises an exception.
fix
Ensure header format is correct, e.g., 'compute 2.1'.
affects: all
gotchaThe function 'parse_version' requires a WebOb request object. Passing a plain dict or other request object will raise an error.
fix
If not using WebOb, use 'parse_version_string' directly.
affects: all
deprecatedThe function 'get_major_version' was deprecated in 2.0.0 and removed in 2.1.0.
fix
Use 'parse_version_string' and access the major component.
affects: 2.0.0
Upgrade
Version history
2.1.0latest on PyPI · released Dec 4, 2025
Audit
Dependencies
webobrequiredRequired for parsing HTTP request headers.
Agent activity
9 hits · last 30 days
node
8
Amazon
1
Resources
microversion-parse — pip install microversion-parse · libregistry