How to use the azure-storage-file.azure.storage.file.models.Share function in azure-storage-file

To help you get started, we’ve selected a few azure-storage-file 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-file / azure / storage / file / _deserialization.py View on Github external
def _parse_share(response, name, snapshot=None):
    if response is None:
        return None

    metadata = _parse_metadata(response)
    props = _parse_properties(response, ShareProperties)
    return Share(name, props, metadata, snapshot)
github Azure / azure-storage-python / azure-storage-file / azure / storage / file / _deserialization.py View on Github external
'''
    if response is None or response.body is None:
        return None

    shares = _list()
    list_element = ETree.fromstring(response.body)

    # Set next marker
    next_marker = list_element.findtext('NextMarker') or None
    setattr(shares, 'next_marker', next_marker)

    shares_element = list_element.find('Shares')

    for share_element in shares_element.findall('Share'):
        # Name element
        share = Share()
        share.name = share_element.findtext('Name')

        # Snapshot
        share.snapshot = share_element.findtext('Snapshot')

        # Metadata
        metadata_root_element = share_element.find('Metadata')
        if metadata_root_element is not None:
            share.metadata = dict()
            for metadata_element in metadata_root_element:
                share.metadata[metadata_element.tag] = metadata_element.text

        # Properties
        properties_element = share_element.find('Properties')
        share.properties.last_modified = parser.parse(properties_element.findtext('Last-Modified'))
        share.properties.etag = properties_element.findtext('Etag')

azure-storage-file

Microsoft Azure Storage File Client Library for Python

MIT
Latest version published 5 years ago

Package Health Score

70 / 100
Full package analysis