Skip to main content

OpenStack microversion heaader parser

Project description

A simple parser for OpenStack microversion headers:

import microversion_parse

# headers is a dict of headers with folded (comma-separated
# values) or a list of header, value tuples
version = microversion_parse.get_version(
    headers, service_type='compute',
    legacy_headers=['x-openstack-nova-api-version'])

It processes microversion headers with the standard form:

OpenStack-API-Version: compute 2.1

If provided with a legacy_headers argument, this is treated as a list of headers to check for microversions. Some examples of headers include:

OpenStack-telemetry-api-version: 2.1
OpenStack-nova-api-version: 2.1
X-OpenStack-nova-api-version: 2.1

If a version string cannot be found, None will be returned. If the input is incorrect usual Python exceptions (ValueError, TypeError) are allowed to raise to the caller.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

microversion_parse-0.1.3.tar.gz (13.3 kB view details)

Uploaded Source

Built Distribution

microversion_parse-0.1.3-py2-none-any.whl (7.6 kB view details)

Uploaded Python 2

File details

Details for the file microversion_parse-0.1.3.tar.gz.

File metadata

File hashes

Hashes for microversion_parse-0.1.3.tar.gz
Algorithm Hash digest
SHA256 601859f22504fb9ca941bd5cad773ad8354d63561d316c41096d9c4c7f0dba79
MD5 9a519878d0fe29da4b1bce41c5eabb24
BLAKE2b-256 1a11ee8024e8bd33ae3f7947453ae941f839cdf54d3442286f214046741a59d4

See more details on using hashes here.

File details

Details for the file microversion_parse-0.1.3-py2-none-any.whl.

File metadata

File hashes

Hashes for microversion_parse-0.1.3-py2-none-any.whl
Algorithm Hash digest
SHA256 08b383070931cfbaa12322569645d38837a213f7d8c2c6df4242228e6bf8eff6
MD5 3a79f65fa670801c2d0715451899c213
BLAKE2b-256 efa666e0206b1e9c7356faafc12870e7280c248905524f2fba8c540fcb23048a

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page