How to use the azure-storage-common.azure.storage.common._common_conversion._to_str function in azure-storage-common

To help you get started, we’ve selected a few azure-storage-common examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github Azure / azure-storage-python / azure-storage-common / azure / storage / common / _deserialization.py View on Github external
def _parse_metadata(response):
    '''
    Extracts out resource metadata information.
    '''

    if response is None or response.headers is None:
        return None

    metadata = _dict()
    for key, value in response.headers.items():
        if key.lower().startswith('x-ms-meta-'):
            metadata[key[10:]] = _to_str(value)

    return metadata
github Azure / azure-storage-python / azure-storage-common / azure / storage / common / _deserialization.py View on Github external
'etag': (None, 'etag', _to_str),
    'x-ms-blob-type': (None, 'blob_type', _to_str),
    'content-length': (None, 'content_length', _to_int),
    'content-range': (None, 'content_range', _to_str),
    'x-ms-blob-sequence-number': (None, 'page_blob_sequence_number', _to_int),
    'x-ms-blob-committed-block-count': (None, 'append_blob_committed_block_count', _to_int),
    'x-ms-blob-public-access': (None, 'public_access', _to_str),
    'x-ms-access-tier': (None, 'blob_tier', _to_str),
    'x-ms-access-tier-change-time': (None, 'blob_tier_change_time', parser.parse),
    'x-ms-access-tier-inferred': (None, 'blob_tier_inferred', _bool),
    'x-ms-archive-status': (None, 'rehydration_status', _to_str),
    'x-ms-share-quota': (None, 'quota', _to_int),
    'x-ms-server-encrypted': (None, 'server_encrypted', _bool),
    'x-ms-creation-time': (None, 'creation_time', parser.parse),
    'content-type': ('content_settings', 'content_type', _to_str),
    'cache-control': ('content_settings', 'cache_control', _to_str),
    'content-encoding': ('content_settings', 'content_encoding', _to_str),
    'content-disposition': ('content_settings', 'content_disposition', _to_str),
    'content-language': ('content_settings', 'content_language', _to_str),
    'content-md5': ('content_settings', 'content_md5', _to_str),
    'x-ms-lease-status': ('lease', 'status', _to_str),
    'x-ms-lease-state': ('lease', 'state', _to_str),
    'x-ms-lease-duration': ('lease', 'duration', _to_str),
    'x-ms-copy-id': ('copy', 'id', _to_str),
    'x-ms-copy-source': ('copy', 'source', _to_str),
    'x-ms-copy-status': ('copy', 'status', _to_str),
    'x-ms-copy-progress': ('copy', 'progress', _to_str),
    'x-ms-copy-completion-time': ('copy', 'completion_time', parser.parse),
    'x-ms-copy-destination-snapshot': ('copy', 'destination_snapshot_time', _to_str),
    'x-ms-copy-status-description': ('copy', 'status_description', _to_str),
    'x-ms-has-immutability-policy': (None, 'has_immutability_policy', _bool),
    'x-ms-has-legal-hold': (None, 'has_legal_hold', _bool),
github Azure / azure-storage-python / azure-storage-common / azure / storage / common / _deserialization.py View on Github external
def _to_upper_str(value):
    return _to_str(value).upper() if value is not None else None

azure-storage-common

Microsoft Azure Storage Common Client Library for Python

MIT
Latest version published 5 years ago

Package Health Score

76 / 100
Full package analysis

Similar packages