How to use the azure-storage-blob.azure.storage.blob.models.ResourceProperties function in azure-storage-blob

To help you get started, we’ve selected a few azure-storage-blob 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-storage / blob / models.py View on Github external
'''
    Response for an append block request.
    
    :ivar int append_offset:
        Position to start next append.
    :ivar int committed_block_count:
        Number of committed append blocks.
    '''

    def __init__(self):
        super(ResourceProperties, self).__init__()
        self.append_offset = None
        self.committed_block_count = None


class PageBlobProperties(ResourceProperties):
    '''
    Response for a page request.
    
    :ivar int sequence_number:
        Identifer for page blobs to help handle concurrent writes.
    '''

    def __init__(self):
        super(ResourceProperties, self).__init__()
        self.sequence_number = None


class PublicAccess(object):
    '''
    Specifies whether data in the container may be accessed publicly and the level of access.
    '''
github Azure / azure-storage-python / azure-storage-storage / blob / pageblobservice.py View on Github external
premium_page_blob_tier=premium_page_blob_tier,
            if_modified_since=if_modified_since,
            if_unmodified_since=if_unmodified_since,
            if_match=if_match,
            if_none_match=if_none_match,
            timeout=timeout,
            encryption_data=encryption_data
        )

        if count == 0:
            return response

        # _upload_blob_chunks returns the block ids for block blobs so resource_properties
        # is passed as a parameter to get the last_modified and etag for page and append blobs.
        # this info is not needed for block_blobs since _put_block_list is called after which gets this info
        resource_properties = ResourceProperties()
        _upload_blob_chunks(
            blob_service=self,
            container_name=container_name,
            blob_name=blob_name,
            blob_size=count,
            block_size=self.MAX_PAGE_SIZE,
            stream=stream,
            max_connections=max_connections,
            progress_callback=progress_callback,
            validate_content=validate_content,
            lease_id=lease_id,
            uploader_class=_PageBlobChunkUploader,
            if_match=response.etag,
            timeout=timeout,
            content_encryption_key=cek,
            initialization_vector=iv,
github Azure / azure-storage-python / azure-storage-storage / blob / models.py View on Github external
'''

    def __init__(self):
        self.last_modified = None
        self.etag = None
        self.request_server_encrypted = None
        self.encryption_key_sha256 = None

    def clone(self, src):
        self.last_modified = src.last_modified
        self.etag = src.etag
        self.request_server_encrypted = src.request_server_encrypted
        self.encryption_key_sha256 = src.encryption_key_sha256


class AppendBlockProperties(ResourceProperties):
    '''
    Response for an append block request.
    
    :ivar int append_offset:
        Position to start next append.
    :ivar int committed_block_count:
        Number of committed append blocks.
    '''

    def __init__(self):
        super(ResourceProperties, self).__init__()
        self.append_offset = None
        self.committed_block_count = None


class PageBlobProperties(ResourceProperties):
github Azure / azure-storage-python / azure-storage-storage / blob / appendblobservice.py View on Github external
to perform the operation only if the resource's ETag does not match
            the value specified. Specify the wildcard character (*) to perform
            the operation only if the resource does not exist, and fail the
            operation if it does exist.
        :return: ETag and last modified properties for the Append Blob
        :rtype: :class:`~azure.storage.blob.models.ResourceProperties`
        '''
        _validate_not_none('container_name', container_name)
        _validate_not_none('blob_name', blob_name)
        _validate_not_none('stream', stream)
        _validate_encryption_unsupported(self.require_encryption, self.key_encryption_key)

        # _upload_blob_chunks returns the block ids for block blobs so resource_properties
        # is passed as a parameter to get the last_modified and etag for page and append blobs.
        # this info is not needed for block_blobs since _put_block_list is called after which gets this info
        resource_properties = ResourceProperties()
        _upload_blob_chunks(
            blob_service=self,
            container_name=container_name,
            blob_name=blob_name,
            blob_size=count,
            block_size=self.MAX_BLOCK_SIZE,
            stream=stream,
            max_connections=1,  # upload not easily parallelizable
            progress_callback=progress_callback,
            validate_content=validate_content,
            lease_id=lease_id,
            uploader_class=_AppendBlobChunkUploader,
            maxsize_condition=maxsize_condition,
            timeout=timeout,
            resource_properties=resource_properties,
            if_modified_since=if_modified_since,
github Azure / azure-storage-python / azure-storage-storage / blob / models.py View on Github external
def __init__(self):
        super(ResourceProperties, self).__init__()
        self.sequence_number = None

azure-storage-blob

Microsoft Azure Blob Storage Client Library for Python

MIT
Latest version published 1 month ago

Package Health Score

96 / 100
Full package analysis