freshcrate
Home > Databases > azure-storage-common

azure-storage-common

Microsoft Azure Storage Common Client Library for Python

Description

Microsoft Azure Storage SDK for Python ====================================== .. image:: https://travis-ci.org/Azure/azure-storage-python.svg :target: https://travis-ci.org/Azure/azure-storage-python .. image:: https://img.shields.io/codecov/c/github/azure/azure-storage-python.svg :target: https://codecov.io/gh/Azure/azure-storage-python This project provides a client library in Python that makes it easy to consume Microsoft Azure Storage services. For documentation please see the Microsoft Azure `Python Developer Center`_ and our `API Reference`_ (also available on `readthedocs`_). If you are looking for the Service Bus or Azure Management libraries, please visit https://github.com/Azure/azure-sdk-for-python. Compatibility ============= **IMPORTANT**: If you have an earlier version of the azure package (version < 1.0), you should uninstall it before installing this package. You can check the version using pip: .. code:: shell pip freeze If you see azure==0.11.0 (or any version below 1.0), uninstall it first then install it again: .. code:: shell pip uninstall azure pip install azure If you are upgrading from a version older than 0.30.0, see the upgrade doc, the usage samples in the samples directory, and the ChangeLog and BreakingChanges. If you are encountering `problems`_ installing azure storage on Azure Web Apps, `upgrading pip`_ might help. **IMPORTANT**: If you have an earlier version of the azure-storage package (version <= 0.36.0), you should uninstall it before installing the new split packages. You can check the version using pip: .. code:: shell pip freeze If you see azure-storage==0.36.0 (or any version below 0.36.0), uninstall it first: .. code:: shell pip uninstall azure-storage Features ======== - Blob - Create/Read/Update/Delete Containers - Create/Read/Update/Delete Blobs - Advanced Blob Operations - Queue - Create/Delete Queues - Insert/Peek Queue Messages - Advanced Queue Operations - Files - Create/Update/Delete Shares - Create/Update/Delete Directories - Create/Read/Update/Delete Files - Advanced File Operations Getting Started =============== Download -------- The Azure Storage SDK for Python is composed of 5 packages: - azure-storage-blob - Contains the blob service APIs. - azure-storage-file - Contains the file service APIs. - azure-storage-queue - Contains the queue service APIs. - azure-storage-common - Contains common code shared by blob, file and queue. - azure-storage-nspkg - Owns the azure.storage namespace, user should not use this directly. **Note**: prior to and including version 0.36.0, there used to be a single package (azure-storage) containing all services. It is no longer supported, and users should install the 3 before-mentioned service packages individually, depending on the need. In addition, the **table** package is no longer releasing under the azure-storage namespace, please refer to `cosmosdb`_. Option 1: Via PyPi ~~~~~~~~~~~~~~~~~~ To install via the Python Package Index (PyPI), type: :: pip install azure-storage-blob pip install azure-storage-file pip install azure-storage-queue Option 2: Source Via Git ~~~~~~~~~~~~~~~~~~~~~~~~ To get the source code of the SDK via git just type: :: git clone git://github.com/Azure/azure-storage-python.git cd ./azure-storage-python/azure-storage-nspkg python setup.py install cd ../azure-storage-common python setup.py install cd ../azure-storage-blob python setup.py install Replace azure-storage-blob with azure-storage-file or azure-storage-queue, to install the other services. Option 3: Source Zip ~~~~~~~~~~~~~~~~~~~~ Download a zip of the code via GitHub or PyPi. Then follow the same instructions in option 2. Minimum Requirements -------------------- - Python 2.7, 3.3, 3.4, 3.5, or 3.6. - See setup.py for dependencies Usage ----- To use this SDK to call Microsoft Azure storage services, you need to first `create an account`_. Logging ----------- To make debugging easier, it is recommended to turn on logging for the logger named 'azure.storage'. Here are two example configurations: .. code:: python # Basic configuration: configure the root logger, including 'azure.storage' logging.basicConfig(format='%(asctime)s %(name)-20s %(levelname)-5s %(message)s', level=logging.INFO) .. code:: python # More advanced configuration allowing more control logger = logging.getLogger('azure.storage') handler = logging.StreamHandler() formatter = logging.Formatter('%(asctime)s %(name)-20s %(levelname)-5s %(message)s') handler.setFormatter(formatter) logger.addHandler(handler) logger.setLevel(logging.INFO) Here is how we use the logging levels, it is recommended to use INFO: - DEBUG: log strings to sign - INFO: log outgoing requests and responses, as well as retry attempts - WARNING: not used - ERROR: log

Release History

VersionChangesUrgencyDate
2.1.0Imported from PyPI (2.1.0)Low4/21/2026
v2.1.0-blob- Support for 2019-02-02 REST version. Please see our REST API documentation and blog for information about the related added features. - Added Batch Delete Blob API. - Added Batch Set Standard Blob Tier API(for BlockBlob). - Added support to set rehydrate blob priority for Set Standard Blob Tier API - Added Blob Tier support for PutBlob/PutBlockList/CopyBlob APIs. - Added support for client provided encryption key to numerous APIs. Low8/2/2019
v2.1.0-file- Support for 2019-02-02 REST version. Please see our REST API documentation and blog for information about the related added features. - Added update_range_from_file_url API to writes the bytes from one Azure File endpoint into the specified range of another Azure File endpoint. - Added set_directory_properties, create_permission_for_share and get_permission_for_share APIs - Added optional parameters(file_permission, smb_properties) for create_file*, create_directory* related APIs and set_fiLow8/2/2019
v2.1.0-queue- Support for 2019-02-02 REST version. No new features for Queue.Low8/2/2019
v2.1.0-common- Support for 2019-02-02 REST version. Please see our REST API documentation and blog for information about the related added features. - Validate that the echoed client request ID from the service matches the sent one.Low8/2/2019
v2.0.0-common- Added minor helpers for SAS related changes. - Bumped version to fix dependency problem.Low5/9/2019
v1.4.2-common- Reverted to v1.4.0 to fix dependency problems with blob/file/queue v1.5.0.Low5/9/2019
v2.0.1-blob- Updated the dependency to use azure-storage-common~=2.0.Low5/9/2019
v2.0.1-queue- Updated the dependency to use azure-storage-common~=2.0.Low5/9/2019
v2.0.1-file- Updated the dependency to use azure-storage-common~=2.0.Low5/9/2019
v1.4.1-common- Added minor helpers for SAS related changesLow5/9/2019
v2.0.0-file- Support for 2018-11-09 REST version. Please see our REST API documentation and blogs for information about the related added features. - Added an option to get share stats in bytes. - Added support for listing and closing file handles.Low5/9/2019
v2.0.0-queue- Support for 2018-11-09 REST version. (No new feature for Queue)Low5/9/2019
v2.0.0-blob- Support for 2018-11-09 REST version. Please see our REST API documentation and blog for information about the related added features. - Added support for append block from URL(synchronously) for append blobs. - Added support for update page from URL(synchronously) for page blobs. - Added support for generating and using blob snapshot SAS tokens. - Added support for generating user delegation SAS tokens. - Added missing permissions a (add) + c (create) for Container SAS - Throws exceptionLow5/9/2019
v1.5.0-blob- Added new method list_blob_names to efficiently list only blob names in an efficient way.Low2/16/2019
v1.4.0-common- When unable to sign request, avoid wasting time on retries by failing faster. - Allow the use of custom domain when creating service object targeting emulators. - azure-storage-nspkg is not installed anymore on Python 3 (PEP420-based namespace package). - Scrub off sensitive information on requests when logging them.Low11/10/2018
v1.4.0-queue- azure-storage-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)Low11/10/2018
v1.4.0-file- azure-storage-nspkg is not installed anymore on Python 3 (PEP420-based namespace package)Low11/10/2018
v1.4.0-blob- azure-storage-nspkg is not installed anymore on Python 3 (PEP420-based namespace package) - copy_blob method added to BlockBlobService to enable support for deep sync copy.Low11/10/2018
v1.3.1-blob- Fixed design flaw where get_blob_to_* methods buffer entire blob when max_connections is set to 1. - Added support for access conditions on append_blob_from_* methods.Low7/16/2018
v1.3.1-file- Fixed design flaw where get_file_to_* methods buffer entire file when max_connections is set to 1. Low7/16/2018
v1.3.0-blob- Support for 2018-03-28 REST version. Please see our REST API documentation and blog for information about the related added features. - Added support for setting static website service properties. - Added support for getting account information, such as SKU name and account kind. - Added support for put block from URL(synchronously).Low6/27/2018
v1.3.0-file- Support for 2018-03-28 REST version. Please see our REST API documentation and blog for information about the related added features.Low6/27/2018
v1.3.0-queue- Support for 2018-03-28 REST version. Please see our REST API documentation and blog for information about the related added features.Low6/27/2018
v1.3.0-common- Support for 2018-03-28 REST version. Please see our REST API documentation and blog for information about the related added features.Low6/27/2018
v1.2.0rc1-common- Increased default socket timeout to a more reasonable number for Python 3.5+. - Fixed bug where seekable streams (request body) were not being reset for retries.Low5/23/2018
v1.2.0rc1-blob- Support for 2017-11-09 REST version. Please see our REST API documentation and blog for information about the related added features. - Support for write-once read-many containers. - Added support for OAuth authentication for HTTPS requests(Please note that this feature is available in preview).Low5/23/2018
v1.2.0rc1-file- Support for 2017-11-09 REST version. Please see our REST API documentation and blog for information about the related added features.Low5/23/2018
v1.2.0rc1-queue- Support for 2017-11-09 REST version. Please see our REST API documentation and blog for information about the related added features. - Added support for OAuth authentication for HTTPS requests(Please note that this feature is available in preview).Low5/23/2018
v1.1.0-file- Support for 2017-07-29 REST version. Please see our REST API documentation and blogs for information about the related added features. - **[Breaking]** Error message now contains the ErrorCode from the x-ms-error-code header value.Low2/6/2018
v1.1.0-queue- Support for 2017-07-29 REST version. Please see our REST API documentation and blogs for information about the related added features. - Queue messages can now have an arbitrarily large or infinite time to live. - **[Breaking]** Error message now contains the ErrorCode from the x-ms-error-code header value.Low2/6/2018
v1.1.0-common- Support for 2017-07-29 REST version. Please see our REST API documentation and blogs for information about the related added features. - **[Breaking]** Error message now contains the ErrorCode from the x-ms-error-code header value.Low2/6/2018
v1.1.0-blob- Support for 2017-07-29 REST version. Please see our REST API documentation and blogs for information about the related added features. - Added support for soft delete feature. If a delete retention policy is enabled through the set service properties API, then blobs or snapshots could be deleted softly and retained for a specified number of days, before being permanently removed by garbage collection. - **[Breaking]** Error message now contains the ErrorCode from the x-ms-error-code header vLow2/6/2018
v1.0.0-file- The package has switched from Apache 2.0 to the MIT license. - Fixed bug where get_file_to_* cannot get a single byte when start_range and end_range are both equal to 0. - [Breaking] Metadata keys are now case-preserving when fetched from the service. Previously they were made lower-case by the library.Low1/23/2018
v1.0.0-queue- The package has switched from Apache 2.0 to the MIT license.Low1/23/2018
v1.0.0-blob- The package has switched from Apache 2.0 to the MIT license. - Fixed bug where get_blob_to_* cannot get a single byte when start_range and end_range are both equal to 0. - Optimized page blob upload for create_blob_from_* methods, by skipping the empty chunks. - Added convenient method to generate container url (make_container_url). - [Breaking] Metadata keys are now case-preserving when fetched from the service. Previously they were made lower-case by the library.Low1/23/2018
v1.0.0-common- The package has switched from Apache 2.0 to the MIT license. - Added back the ability to generate account SAS for table service. - Fixed bug where a question mark prefix on SAS tokens causes failures. - Fixed the handling of path style host for the Storage Emulator, specifically the location lock and retry to secondary location. - [Breaking] Renamed the confusing argument name increment_power to increment_base on ExponentialRetry.Low1/23/2018
v3.0.0-nspkg- The package has switched from Apache 2.0 to the MIT license.Low1/23/2018
v0.37.1-common- Fixed the return type of __add__ and __or__ methods on the AccountPermissions class - Added the captured exception to retry_context, in case the user wants more info in retry_callback or implement their own retry class. - Added random jitters to retry intervals, in order to avoid multiple retries to happen at the exact same timeLow11/3/2017
v0.37.1-blob- Enabling MD5 validation no longer uses the memory-efficient algorithm for large block blobs, since computing the MD5 hash requires reading the entire block into memory. - Fixed a bug in the _SubStream class which was at risk of causing data corruption when using the memory-efficient algorithm for large block blobs. - Support for AccessTierChangeTime to get the last time a tier was modified on an individual blob.Low11/3/2017
v2.0.0-nspkgThis is an internal package. The user should not use this directly.Low10/5/2017
v0.37.0-common## Version 0.37.0: ### All: - Added logging to the library, the name of the logger is 'azure.storage'. User must add handlers to the logger to output logs. Please refer to readme for more info. - Secondary endpoints may now be specified in connection strings, provided the corresponding primary endpoint is specified. See the connection string documentation for details. - Fixed an off-by-1 bug in exponential retry interval calculation. - The library has been split into 5 different packaLow10/5/2017
v0.37.0-queue## Version 0.37.0: ### All: - Added logging to the library, the name of the logger is 'azure.storage'. User must add handlers to the logger to output logs. Please refer to readme for more info. - Secondary endpoints may now be specified in connection strings, provided the corresponding primary endpoint is specified. See the connection string documentation for details. - Fixed an off-by-1 bug in exponential retry interval calculation. - The library has been split into 5 different packaLow10/5/2017
v0.37.0-file## Version 0.37.0: ### All: - Added logging to the library, the name of the logger is 'azure.storage'. User must add handlers to the logger to output logs. Please refer to readme for more info. - Secondary endpoints may now be specified in connection strings, provided the corresponding primary endpoint is specified. See the connection string documentation for details. - Fixed an off-by-1 bug in exponential retry interval calculation. - The library has been split into 5 different packaLow10/5/2017
v0.37.0-blob## Version 0.37.0: ### All: - Added logging to the library, the name of the logger is 'azure.storage'. User must add handlers to the logger to output logs. Please refer to readme for more info. - Secondary endpoints may now be specified in connection strings, provided the corresponding primary endpoint is specified. See the connection string documentation for details. - Fixed an off-by-1 bug in exponential retry interval calculation. - The library has been split into 5 different packaLow10/5/2017
v0.36.0## Version 0.36.0: ### Blob: - For Standard Storage Accounts only, added support for getting and setting the tier on an individual block blob. This feature is in preview. ### Table: - Fixed bug where inserting entity with an empty sting as RowKey or PartitionKey raised error. Low8/22/2017
v0.35.1## Version 0.35.1: ### Blob: - Fixed bug where calling create_from_* and and append_blob_from_* methods with no data fails. Low7/15/2017
v0.35.0## Version 0.35.0: ### All: - Support for 2017-04-17 REST version. Please see our REST API documentation and blogs for information about the related added features. If you are using the Storage Emulator, please update to Emulator version 5.2. - Fixed a bug where deserialization of service stats throws a TypeError when the service is unavailable. ### Blob: - For Premium Accounts only, added support for getting and setting the tier on a page blob. The tier can also be set when creating orLow7/13/2017
v0.34.3## Version 0.34.3: ### All: - Made the socket timeout configurable. Increased the default socket timeout to 20 seconds. - Fixed a bug where SAS tokens were being duplicated on retriesLow6/14/2017
v0.34.2## Version 0.34.2: ### All: - Made various improvements/fixes to the Azure namespace packaging system.Low5/8/2017
v0.34.1## Version 0.34.1: ### Blob: - Fixed a bug where downloading the snapshot of a blob will fail in some cases.Low4/12/2017

Dependencies & License Audit

Loading dependencies...

Similar Packages

azure-storage-blobMicrosoft Azure Blob Storage Client Library for Pythonazure-template_0.1.0b6187637
azure-storage-file-shareMicrosoft Azure Azure File Share Storage Client Library for Pythonazure-template_0.1.0b6187637
mirakuruProcess executor (not only) for tests.3.0.2
opentelemetry-instrumentation-qdrantOpenTelemetry Qdrant instrumentation0.60.0
django-modelclusterDjango extension to allow working with 'clusters' of models as a single unit, independently of the database6.4.1