How to use the azure-storage-queue.azure.storage.queue.models.Queue function in azure-storage-queue

To help you get started, we’ve selected a few azure-storage-queue 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-queue / azure / storage / queue / _deserialization.py View on Github external
'''
    if response is None or response.body is None:
        return None

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

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

    queues_element = list_element.find('Queues')

    for queue_element in queues_element.findall('Queue'):
        # Name element
        queue = Queue()
        queue.name = queue_element.findtext('Name')

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

        # Add queue to list
        queues.append(queue)

    return queues

azure-storage-queue

Microsoft Azure Azure Queue Storage Client Library for Python

MIT
Latest version published 2 months ago

Package Health Score

96 / 100
Full package analysis

Popular azure-storage-queue functions