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.2.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

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

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for microversion_parse-0.1.2.tar.gz
Algorithm Hash digest
SHA256 208b00bf0c7b2fce409ba3448d3367e0ac6c6e7c4d3c34e4334957493285ab93
MD5 a6ac9ed6d6efbc94c6fa555125b492a1
BLAKE2b-256 38a8d1f965184f80edb78c809653e9137a8c5fbda138b10c9f3a01e3c40cf494

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for microversion_parse-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 dd7065161bfab6e3afb8acea928e2d06d1113cbf8dbdba647dac14b5d69dec0c
MD5 ba025854542b3009d0c8cd298d9b6c98
BLAKE2b-256 5ee9312a2e337ef3c8a3a9f6c0da50a6f611f6c7aa26be9ff4e9a198da4a0179

See more details on using hashes here.

Supported by

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