How to use the azure-storage-queue.azure.storage.queue._encryption._decrypt_queue_message 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
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)

        message.insertion_time = parser.parse(message_element.findtext('InsertionTime'))
        message.expiration_time = parser.parse(message_element.findtext('ExpirationTime'))

        message.pop_receipt = message_element.findtext('PopReceipt')

        time_next_visible = message_element.find('TimeNextVisible')
        if time_next_visible is not None:
            message.time_next_visible = parser.parse(time_next_visible.text)

        # Add message to list
        messages.append(message)

    return messages

azure-storage-queue

Microsoft Azure Azure Queue Storage Client Library for Python

MIT
Latest version published 3 months ago

Package Health Score

96 / 100
Full package analysis

Popular azure-storage-queue functions