Movatterモバイル変換


[0]ホーム

URL:


Skip to main content

This browser is no longer supported.

Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.

Download Microsoft EdgeMore info about Internet Explorer and Microsoft Edge
Table of contentsExit editor mode

Copy a blob with Python

Feedback

In this article

This article provides an overview of copy operations using theAzure Storage client library for Python.

About copy operations

Copy operations can be used to move data within a storage account, between storage accounts, or into a storage account from a source outside of Azure. When using the Blob Storage client libraries to copy data resources, it's important to understand the REST API operations behind the client library methods. The following table lists REST API operations that can be used to copy data resources to a storage account. The table also includes links to detailed guidance about how to perform these operations using theAzure Storage client library for Python.

REST API operationWhen to useClient library methodsGuidance
Put Blob From URLThis operation is preferred for scenarios where you want to move data into a storage account and have a URL for the source object. This operation completes synchronously.upload_blob_from_urlCopy a blob from a source object URL with Python
Put Block From URLFor large objects, you can usePut Block From URL to write individual blocks to Blob Storage, and then callPut Block List to commit those blocks to a block blob. This operation completes synchronously.stage_block_from_urlCopy a blob from a source object URL with Python
Copy BlobThis operation can be used when you want asynchronous scheduling for a copy operation.start_copy_from_urlCopy a blob with asynchronous scheduling using Python

For append blobs, you can use theAppend Block From URL operation to commit a new block of data to the end of an existing append blob. The following client library method wraps this operation:

For page blobs, you can use thePut Page From URL operation to write a range of pages to a page blob where the contents are read from a URL. The following client library method wraps this operation:

Client library resources

Related content

  • This article is part of the Blob Storage developer guide for Python. To learn more, see the full list of developer guide articles atBuild your Python app.

Feedback

Was this page helpful?

YesNoNo

Need help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?

  • Last updated on

In this article

Was this page helpful?

YesNo
NoNeed help with this topic?

Want to try using Ask Learn to clarify or guide you through this topic?

Suggest a fix?