How to use the azure-storage-queue.azure.storage.queue.models.QueueMessage 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
def _parse_queue_message_from_headers(response):
    '''
    Extracts pop receipt and time next visible from headers.
    '''
    message = QueueMessage()
    message.pop_receipt = response.headers.get('x-ms-popreceipt')
    message.time_next_visible = parser.parse(response.headers.get('x-ms-time-next-visible'))

    return message
github Azure / azure-storage-python / azure-storage-queue / azure / storage / queue / _deserialization.py View on Github external
expiration-time
          opaque-string-receipt-data
          time-next-visible
          integer
          message-body
        
    
    '''
    if response is None or response.body is None:
        return None

    messages = list()
    list_element = ETree.fromstring(response.body)

    for message_element in list_element.findall('QueueMessage'):
        message = QueueMessage()

        message.id = message_element.findtext('MessageId')

        dequeue_count = message_element.findtext('DequeueCount')
        if dequeue_count is not None:
            message.dequeue_count = _to_int(dequeue_count)

        # content is not returned for put_message
        if content is not None:
            message.content = content
        else:
            message.content = message_element.findtext('MessageText')
            if (key_encryption_key is not None) or (resolver is not None):
                message.content = _decrypt_queue_message(message.content, require_encryption,
                                                         key_encryption_key, resolver)
            message.content = decode_function(message.content)

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