OpenStack microversion heaader parser
Project description
microversion_parse
=================
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.
=================
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file microversion_parse-0.1.0.tar.gz
.
File metadata
- Download URL: microversion_parse-0.1.0.tar.gz
- Upload date:
- Size: 8.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ae3a58638fc58d7b31ab9965de8350802e4b137b0dcd4bef6239b612cc5c1f1 |
|
MD5 | 8a144e234f7f311d7e6a6ea08dd1de84 |
|
BLAKE2b-256 | 4fb28873786013a63546b94baf8856755be9da69f50cbac90807d077b63ddfb0 |
File details
Details for the file microversion_parse-0.1.0-py2-none-any.whl
.
File metadata
- Download URL: microversion_parse-0.1.0-py2-none-any.whl
- Upload date:
- Size: 6.4 kB
- Tags: Python 2
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0c606a750ccf207ded8c4a5aedb9cb319017198d3cfaa8966c0e336d2aa92c7e |
|
MD5 | 1007cc568a9c8be7ead68963d5af5c42 |
|
BLAKE2b-256 | 8f785a64f9bd051a1d4a4ce583b31cedfb9480c3c735c97eb09631102686a6b4 |