azure-storage-blob 12.19.0b1__tar.gz → 12.20.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/CHANGELOG.md +41 -2
- {azure-storage-blob-12.19.0b1/azure_storage_blob.egg-info → azure-storage-blob-12.20.0}/PKG-INFO +7 -12
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/README.md +2 -2
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/__init__.py +17 -5
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_blob_client.py +26 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_blob_service_client.py +11 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_container_client.py +45 -17
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_download.py +5 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_encryption.py +254 -165
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/_azure_blob_storage.py +21 -3
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/_configuration.py +4 -11
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/_serialization.py +41 -49
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/_azure_blob_storage.py +23 -3
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/_configuration.py +4 -11
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_append_blob_operations.py +24 -58
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_blob_operations.py +123 -306
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_block_blob_operations.py +37 -86
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_container_operations.py +98 -289
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_page_blob_operations.py +51 -150
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_service_operations.py +49 -125
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/models/_models_py3.py +31 -31
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_append_blob_operations.py +25 -59
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_blob_operations.py +123 -306
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_block_blob_operations.py +39 -88
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_container_operations.py +100 -291
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_page_blob_operations.py +52 -151
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_service_operations.py +50 -126
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_lease.py +1 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_models.py +3 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_serialize.py +1 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/authentication.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/avro_io.py +0 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/avro_io_async.py +0 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/datafile.py +0 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/datafile_async.py +0 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/schema.py +4 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/base_client.py +72 -87
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/base_client_async.py +115 -27
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/models.py +120 -27
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/parser.py +7 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/policies.py +96 -66
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/policies_async.py +48 -21
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/response_handlers.py +14 -16
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/shared_access_signature.py +3 -3
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared_access_signature.py +48 -33
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_upload_helpers.py +4 -7
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_version.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/__init__.py +13 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_blob_client_async.py +17 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_blob_service_client_async.py +6 -3
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_container_client_async.py +34 -13
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_download_async.py +11 -10
- azure-storage-blob-12.20.0/azure/storage/blob/aio/_encryption_async.py +72 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_lease_async.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_upload_helpers.py +8 -10
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0/azure_storage_blob.egg-info}/PKG-INFO +7 -12
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure_storage_blob.egg-info/SOURCES.txt +1 -0
- azure-storage-blob-12.20.0/azure_storage_blob.egg-info/requires.txt +7 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_client_side_encryption.py +2 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/setup.py +6 -6
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/_test_base_legacy.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/download.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/upload.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/upload_block.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/upload_from_file.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/_test_base.py +29 -4
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/download.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/upload.py +2 -2
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/upload_block.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/upload_from_file.py +1 -1
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_encryption_v2.py +82 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_encryption_v2_async.py +92 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_common_blob.py +87 -2
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_common_blob_async.py +85 -2
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_cpk.py +23 -23
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_cpk_async.py +23 -23
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_page_blob.py +39 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_page_blob_async.py +39 -0
- azure-storage-blob-12.19.0b1/azure_storage_blob.egg-info/requires.txt +0 -7
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/LICENSE +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/MANIFEST.in +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_deserialize.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/_patch.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/_vendor.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/_patch.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/aio/operations/_patch.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/models/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/models/_azure_blob_storage_enums.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/models/_patch.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_generated/operations/_patch.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_list_blobs_helper.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_quick_query_helper.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/avro/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/constants.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/request_handlers.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/uploads.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_shared/uploads_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_list_blobs_helper.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/aio/_models.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/py.typed +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure_storage_blob.egg-info/dependency_links.txt +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure_storage_blob.egg-info/not-zip-safe +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure_storage_blob.egg-info/top_level.txt +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/migration_guide.md +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/pyproject.toml +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/README.md +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_authentication.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_authentication_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_batch_delete_blobs.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_client_side_encryption_keyvault.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_common.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_common_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_container_access_policy.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_container_access_policy_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_containers.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_containers_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_copy_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_copy_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_directory_interface.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_directory_interface_mimetype.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_enumerate_blobs.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_enumerate_blobs_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_hello_world.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_hello_world_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_network_activity_logging.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_proxy_configuration.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_query.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_service.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_service_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_walk_blob_hierarchy.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/samples/blob_samples_walk_blob_hierarchy_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/setup.cfg +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/avro/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/avro/test_avro.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/avro/test_avro_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/conftest.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/encryption_test_helper.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/fake_credentials.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/T1_legacy_tests/list_blobs.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/key_wrapper.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/perfstress_tests/list_blobs.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/settings/__init__.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/settings/settings_fake.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/settings/testcase.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_append_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_append_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_access_conditions.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_access_conditions_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_api_version.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_api_version_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_client.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_client_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_encryption.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_encryption_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_retry.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_retry_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_service_properties.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_service_properties_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_service_stats.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_service_stats_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_storage_account.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_storage_account_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_tags.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_blob_tags_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_block_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_block_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_block_blob_sync_copy.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_block_blob_sync_copy_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_container.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_container_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_cpk_n.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_cpk_n_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_dictmixin.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_get_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_get_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_helpers.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_helpers_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_large_block_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_large_block_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_largest_block_blob.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_largest_block_blob_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_logging.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_logging_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_ors.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_ors_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_quick_query.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_retry.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_retry_async.py +0 -0
- {azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/tests/test_upload_chunking.py +0 -0
@@ -1,5 +1,44 @@
|
|
1
1
|
# Release History
|
2
2
|
|
3
|
+
## 12.20.0 (2024-05-07)
|
4
|
+
|
5
|
+
### Features Added
|
6
|
+
- Stable release of features from 12.20.0b1
|
7
|
+
|
8
|
+
## 12.20.0b1 (2024-04-16)
|
9
|
+
|
10
|
+
This version and all future versions will require Python 3.8+. Python 3.7 is no longer supported.
|
11
|
+
|
12
|
+
### Features Added
|
13
|
+
- Added support for service version 2024-05-04.
|
14
|
+
- The `services` parameter has been added to the `generate_account_sas` API, which enables the ability to generate SAS
|
15
|
+
tokens to be used with multiple services. By default, the SAS token service scope will default to the current service.
|
16
|
+
|
17
|
+
### Bugs Fixed
|
18
|
+
- Bumped dependency of `typing-extensions` to `>=4.6.0` to avoid potential `TypeError` with `typing.TypeVar` on
|
19
|
+
Python 3.12.
|
20
|
+
- Fixed an issue where authentication errors could raise `AttributeError` instead of `ClientAuthenticationError` when
|
21
|
+
using async OAuth credentials.
|
22
|
+
- Fixed a typing issue which incorrectly typed the `readinto` API. The correct input type is `IO[bytes]`.
|
23
|
+
- Fixed a typo in the initialization of `completion_time` for the `CopyProperties` model.
|
24
|
+
- Fixed a couple of issues with `upload_blob` when using Iterators/Generators as the data input.
|
25
|
+
|
26
|
+
### Other Changes
|
27
|
+
- Passing `prefix` to the following `ContainerClient` APIs now raises a `ValueError`:
|
28
|
+
`list_blobs`, `list_blobs_names`, and `walk_blobs`. This change was made to avoid confusion for filtering results.
|
29
|
+
The `name_starts_with` parameter is the correct parameter to pass for filtering.
|
30
|
+
|
31
|
+
## 12.19.1 (2024-03-05)
|
32
|
+
|
33
|
+
### Bugs Fixed
|
34
|
+
- Fixed an issue where under rare circumstances, full downloads of sparse Page Blobs could result in the
|
35
|
+
downloaded content containing up to one "chunk" of extra `\x00` at the end due to an optimization error.
|
36
|
+
|
37
|
+
## 12.19.0 (2023-11-07)
|
38
|
+
|
39
|
+
### Features Added
|
40
|
+
- Stable release of features from 12.19.0b1
|
41
|
+
|
3
42
|
## 12.19.0b1 (2023-10-17)
|
4
43
|
|
5
44
|
### Features Added
|
@@ -189,7 +228,7 @@ This version and all future versions will require Python 3.6+. Python 2.7 is no
|
|
189
228
|
- `set_immutability_policy`
|
190
229
|
- Encryption Scope is now supported for Sync Blob Copy (`copy_from_url()`).
|
191
230
|
- Encryption Scope is now supported as a SAS permission.
|
192
|
-
- Added support for blob names containing invalid XML characters.
|
231
|
+
- Added support for blob names containing invalid XML characters.
|
193
232
|
Previously \uFFFE and \uFFFF would fail if present in blob name.
|
194
233
|
- Added support for listing system containers with get_blob_containers().
|
195
234
|
- Added support for `find_blobs_by_tags()` on a container.
|
@@ -240,7 +279,7 @@ This version and all future versions will require Python 3.6+. Python 2.7 is no
|
|
240
279
|
|
241
280
|
**Fixes**
|
242
281
|
- Blob Client Typing annotation issues have been resolved, specifically `invalid type inference` issues (#19906)
|
243
|
-
- Duplicate type signature issue has been resolved (#19739)
|
282
|
+
- Duplicate type signature issue has been resolved (#19739)
|
244
283
|
|
245
284
|
## 12.9.0 (2021-09-15)
|
246
285
|
**Stable release of preview features**
|
{azure-storage-blob-12.19.0b1/azure_storage_blob.egg-info → azure-storage-blob-12.20.0}/PKG-INFO
RENAMED
@@ -1,31 +1,26 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: azure-storage-blob
|
3
|
-
Version: 12.
|
3
|
+
Version: 12.20.0
|
4
4
|
Summary: Microsoft Azure Blob Storage Client Library for Python
|
5
5
|
Home-page: https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
6
6
|
Author: Microsoft Corporation
|
7
7
|
Author-email: ascl@microsoft.com
|
8
8
|
License: MIT License
|
9
9
|
Keywords: azure,azure sdk
|
10
|
-
Classifier: Development Status ::
|
10
|
+
Classifier: Development Status :: 5 - Production/Stable
|
11
11
|
Classifier: Programming Language :: Python
|
12
12
|
Classifier: Programming Language :: Python :: 3 :: Only
|
13
13
|
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: Programming Language :: Python :: 3.7
|
15
14
|
Classifier: Programming Language :: Python :: 3.8
|
16
15
|
Classifier: Programming Language :: Python :: 3.9
|
17
16
|
Classifier: Programming Language :: Python :: 3.10
|
18
17
|
Classifier: Programming Language :: Python :: 3.11
|
18
|
+
Classifier: Programming Language :: Python :: 3.12
|
19
19
|
Classifier: License :: OSI Approved :: MIT License
|
20
|
-
Requires-Python: >=3.
|
20
|
+
Requires-Python: >=3.8
|
21
21
|
Description-Content-Type: text/markdown
|
22
|
-
License-File: LICENSE
|
23
|
-
Requires-Dist: azure-core<2.0.0,>=1.28.0
|
24
|
-
Requires-Dist: cryptography>=2.1.4
|
25
|
-
Requires-Dist: typing-extensions>=4.3.0
|
26
|
-
Requires-Dist: isodate>=0.6.1
|
27
22
|
Provides-Extra: aio
|
28
|
-
|
23
|
+
License-File: LICENSE
|
29
24
|
|
30
25
|
# Azure Storage Blobs client library for Python
|
31
26
|
Azure Blob storage is Microsoft's object storage solution for the cloud. Blob storage is optimized for storing massive amounts of unstructured data, such as text or binary data.
|
@@ -49,7 +44,7 @@ Blob storage is ideal for:
|
|
49
44
|
## Getting started
|
50
45
|
|
51
46
|
### Prerequisites
|
52
|
-
* Python 3.
|
47
|
+
* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
|
53
48
|
* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an
|
54
49
|
[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.
|
55
50
|
|
@@ -258,7 +253,7 @@ container_client = ContainerClient.from_connection_string(conn_str="<connection_
|
|
258
253
|
container_client.create_container()
|
259
254
|
```
|
260
255
|
|
261
|
-
Use the async client to
|
256
|
+
Use the async client to create a container
|
262
257
|
|
263
258
|
```python
|
264
259
|
from azure.storage.blob.aio import ContainerClient
|
@@ -20,7 +20,7 @@ Blob storage is ideal for:
|
|
20
20
|
## Getting started
|
21
21
|
|
22
22
|
### Prerequisites
|
23
|
-
* Python 3.
|
23
|
+
* Python 3.8 or later is required to use this package. For more details, please read our page on [Azure SDK for Python version support policy](https://github.com/Azure/azure-sdk-for-python/wiki/Azure-SDKs-Python-version-support-policy).
|
24
24
|
* You must have an [Azure subscription](https://azure.microsoft.com/free/) and an
|
25
25
|
[Azure storage account](https://docs.microsoft.com/azure/storage/common/storage-account-overview) to use this package.
|
26
26
|
|
@@ -229,7 +229,7 @@ container_client = ContainerClient.from_connection_string(conn_str="<connection_
|
|
229
229
|
container_client.create_container()
|
230
230
|
```
|
231
231
|
|
232
|
-
Use the async client to
|
232
|
+
Use the async client to create a container
|
233
233
|
|
234
234
|
```python
|
235
235
|
from azure.storage.blob.aio import ContainerClient
|
@@ -3,6 +3,8 @@
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
4
4
|
# license information.
|
5
5
|
# --------------------------------------------------------------------------
|
6
|
+
# pylint: disable=docstring-keyword-should-match-keyword-only
|
7
|
+
|
6
8
|
import os
|
7
9
|
|
8
10
|
from typing import Union, Iterable, AnyStr, IO, Any, Dict # pylint: disable=unused-import
|
@@ -21,7 +23,8 @@ from ._shared.models import(
|
|
21
23
|
ResourceTypes,
|
22
24
|
AccountSasPermissions,
|
23
25
|
StorageErrorCode,
|
24
|
-
UserDelegationKey
|
26
|
+
UserDelegationKey,
|
27
|
+
Services
|
25
28
|
)
|
26
29
|
from ._generated.models import (
|
27
30
|
RehydratePriority,
|
@@ -60,7 +63,7 @@ from ._models import (
|
|
60
63
|
ArrowType,
|
61
64
|
ObjectReplicationPolicy,
|
62
65
|
ObjectReplicationRule,
|
63
|
-
ImmutabilityPolicy
|
66
|
+
ImmutabilityPolicy,
|
64
67
|
)
|
65
68
|
from ._list_blobs_helper import BlobPrefix
|
66
69
|
|
@@ -91,7 +94,11 @@ def upload_blob_to_url(
|
|
91
94
|
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
|
92
95
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
93
96
|
should be the storage account key.
|
94
|
-
:
|
97
|
+
:type credential:
|
98
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
99
|
+
~azure.core.credentials.AzureSasCredential or
|
100
|
+
~azure.core.credentials.TokenCredential or
|
101
|
+
str or dict[str, str] or None
|
95
102
|
:keyword bool overwrite:
|
96
103
|
Whether the blob to be uploaded should overwrite the current data.
|
97
104
|
If True, upload_blob_to_url will overwrite any existing data. If set to False, the
|
@@ -155,7 +162,11 @@ def download_blob_from_url(
|
|
155
162
|
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
|
156
163
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
157
164
|
should be the storage account key.
|
158
|
-
:
|
165
|
+
:type credential:
|
166
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
167
|
+
~azure.core.credentials.AzureSasCredential or
|
168
|
+
~azure.core.credentials.TokenCredential or
|
169
|
+
str or dict[str, str] or None
|
159
170
|
:keyword bool overwrite:
|
160
171
|
Whether the local file should be overwritten if it already exists. The default value is
|
161
172
|
`False` - in which case a ValueError will be raised if the file already exists. If set to
|
@@ -246,5 +257,6 @@ __all__ = [
|
|
246
257
|
'ArrowType',
|
247
258
|
'BlobQueryReader',
|
248
259
|
'ObjectReplicationPolicy',
|
249
|
-
'ObjectReplicationRule'
|
260
|
+
'ObjectReplicationRule',
|
261
|
+
'Services',
|
250
262
|
]
|
{azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_blob_client.py
RENAMED
@@ -3,7 +3,7 @@
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
4
4
|
# license information.
|
5
5
|
# --------------------------------------------------------------------------
|
6
|
-
# pylint: disable=too-many-lines
|
6
|
+
# pylint: disable=too-many-lines, docstring-keyword-should-match-keyword-only
|
7
7
|
|
8
8
|
from functools import partial
|
9
9
|
from io import BytesIO
|
@@ -237,7 +237,11 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
237
237
|
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
|
238
238
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
239
239
|
should be the storage account key.
|
240
|
-
:type credential:
|
240
|
+
:type credential:
|
241
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
242
|
+
~azure.core.credentials.AzureSasCredential or
|
243
|
+
~azure.core.credentials.TokenCredential or
|
244
|
+
str or dict[str, str] or None
|
241
245
|
:param str snapshot:
|
242
246
|
The optional blob snapshot on which to operate. This can be the snapshot ID string
|
243
247
|
or the response returned from :func:`create_snapshot`. If specified, this will override
|
@@ -326,7 +330,11 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
326
330
|
Credentials provided here will take precedence over those in the connection string.
|
327
331
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
328
332
|
should be the storage account key.
|
329
|
-
:type credential:
|
333
|
+
:type credential:
|
334
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
335
|
+
~azure.core.credentials.AzureSasCredential or
|
336
|
+
~azure.core.credentials.TokenCredential or
|
337
|
+
str or dict[str, str] or None
|
330
338
|
:keyword str version_id: The version id parameter is an opaque DateTime value that, when present,
|
331
339
|
specifies the version of the blob to operate on.
|
332
340
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
@@ -449,7 +457,6 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
449
457
|
|
450
458
|
if blob_type == BlobType.BlockBlob:
|
451
459
|
kwargs['client'] = self._client.block_blob
|
452
|
-
kwargs['data'] = data
|
453
460
|
elif blob_type == BlobType.PageBlob:
|
454
461
|
if self.encryption_version == '2.0' and (self.require_encryption or self.key_encryption_key is not None):
|
455
462
|
raise ValueError("Encryption version 2.0 does not currently support page blobs.")
|
@@ -602,6 +609,8 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
602
609
|
:keyword str source_authorization:
|
603
610
|
Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
|
604
611
|
the prefix of the source_authorization string.
|
612
|
+
:returns: Response from creating a new block blob for a given URL.
|
613
|
+
:rtype: Dict[str, Any]
|
605
614
|
"""
|
606
615
|
options = self._upload_blob_from_url_options(
|
607
616
|
source_url=self._encode_source_url(source_url),
|
@@ -613,7 +622,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
613
622
|
|
614
623
|
@distributed_trace
|
615
624
|
def upload_blob(
|
616
|
-
self, data: Union[bytes, str, Iterable[AnyStr], IO[
|
625
|
+
self, data: Union[bytes, str, Iterable[AnyStr], IO[bytes]],
|
617
626
|
blob_type: Union[str, BlobType] = BlobType.BlockBlob,
|
618
627
|
length: Optional[int] = None,
|
619
628
|
metadata: Optional[Dict[str, str]] = None,
|
@@ -622,6 +631,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
622
631
|
"""Creates a new blob from a data source with automatic chunking.
|
623
632
|
|
624
633
|
:param data: The blob data to upload.
|
634
|
+
:type data: Union[bytes, str, Iterable[AnyStr], IO[AnyStr]]
|
625
635
|
:param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be
|
626
636
|
either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob.
|
627
637
|
:param int length:
|
@@ -1023,6 +1033,10 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1023
1033
|
treat the blob data as CSV data formatted in the default dialect. This can be overridden with
|
1024
1034
|
a custom DelimitedTextDialect, or DelimitedJsonDialect or "ParquetDialect" (passed as a string or enum).
|
1025
1035
|
These dialects can be passed through their respective classes, the QuickQueryDialect enum or as a string
|
1036
|
+
|
1037
|
+
.. note::
|
1038
|
+
"ParquetDialect" is in preview, so some features may not work as intended.
|
1039
|
+
|
1026
1040
|
:paramtype blob_format: ~azure.storage.blob.DelimitedTextDialect or ~azure.storage.blob.DelimitedJsonDialect
|
1027
1041
|
or ~azure.storage.blob.QuickQueryDialect or str
|
1028
1042
|
:keyword output_format:
|
@@ -1528,6 +1542,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
1528
1542
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
1529
1543
|
#other-client--per-operation-configuration>`_.
|
1530
1544
|
:returns: Blob-updated property dict (Etag and last modified)
|
1545
|
+
:rtype: Dict[str, Union[str, datetime]]
|
1531
1546
|
"""
|
1532
1547
|
options = self._set_blob_metadata_options(metadata=metadata, **kwargs)
|
1533
1548
|
try:
|
@@ -2511,6 +2526,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
2511
2526
|
The string should be less than or equal to 64 bytes in size.
|
2512
2527
|
For a given blob, the block_id must be the same size for each block.
|
2513
2528
|
:param data: The blob data.
|
2529
|
+
:type data: Union[Iterable[AnyStr], IO[AnyStr]]
|
2514
2530
|
:param int length: Size of the block.
|
2515
2531
|
:keyword bool validate_content:
|
2516
2532
|
If true, calculates an MD5 hash for each chunk of the blob. The storage
|
@@ -3280,7 +3296,7 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3280
3296
|
.. versionadded:: 12.2.0
|
3281
3297
|
This operation was introduced in API version '2019-07-07'.
|
3282
3298
|
|
3283
|
-
:param previous_snapshot_url:
|
3299
|
+
:param str previous_snapshot_url:
|
3284
3300
|
Specifies the URL of a previous snapshot of the managed disk.
|
3285
3301
|
The response will only contain pages that were changed between the target blob and
|
3286
3302
|
its previous snapshot.
|
@@ -3808,6 +3824,8 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
3808
3824
|
:keyword str source_authorization:
|
3809
3825
|
Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
|
3810
3826
|
the prefix of the source_authorization string.
|
3827
|
+
:returns: Response after uploading pages from specified URL.
|
3828
|
+
:rtype: Dict[str, Any]
|
3811
3829
|
"""
|
3812
3830
|
options = self._upload_pages_from_url_options(
|
3813
3831
|
source_url=self._encode_source_url(source_url),
|
@@ -4236,6 +4254,8 @@ class BlobClient(StorageAccountHostsMixin, StorageEncryptionMixin): # pylint: d
|
|
4236
4254
|
:keyword str source_authorization:
|
4237
4255
|
Authenticate as a service principal using a client secret to access a source blob. Ensure "bearer " is
|
4238
4256
|
the prefix of the source_authorization string.
|
4257
|
+
:returns: Result after appending a new block.
|
4258
|
+
:rtype: Dict[str, Union[str, datetime, int]]
|
4239
4259
|
"""
|
4240
4260
|
options = self._append_block_from_url_options(
|
4241
4261
|
copy_source_url=self._encode_source_url(copy_source_url),
|
@@ -3,6 +3,7 @@
|
|
3
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
4
4
|
# license information.
|
5
5
|
# --------------------------------------------------------------------------
|
6
|
+
# pylint: disable=docstring-keyword-should-match-keyword-only
|
6
7
|
|
7
8
|
import functools
|
8
9
|
import warnings
|
@@ -171,7 +172,11 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
171
172
|
Credentials provided here will take precedence over those in the connection string.
|
172
173
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
173
174
|
should be the storage account key.
|
174
|
-
:
|
175
|
+
:type credential:
|
176
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
177
|
+
~azure.core.credentials.AzureSasCredential or
|
178
|
+
~azure.core.credentials.TokenCredential or
|
179
|
+
str or dict[str, str] or None
|
175
180
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
176
181
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
177
182
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
@@ -551,6 +556,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
551
556
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
552
557
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
553
558
|
#other-client--per-operation-configuration>`_.
|
559
|
+
:returns: A container client to interact with the newly created container.
|
554
560
|
:rtype: ~azure.storage.blob.ContainerClient
|
555
561
|
|
556
562
|
.. admonition:: Example:
|
@@ -588,7 +594,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
588
594
|
If specified, delete_container only succeeds if the
|
589
595
|
container's lease is active and matches this ID.
|
590
596
|
Required if the container has an active lease.
|
591
|
-
:
|
597
|
+
:type lease: ~azure.storage.blob.BlobLeaseClient or str
|
592
598
|
:keyword ~datetime.datetime if_modified_since:
|
593
599
|
A DateTime value. Azure expects the date value passed in to be UTC.
|
594
600
|
If timezone is included, any non-UTC datetimes will be converted to UTC.
|
@@ -612,7 +618,6 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
612
618
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
613
619
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
614
620
|
#other-client--per-operation-configuration>`_.
|
615
|
-
:rtype: None
|
616
621
|
|
617
622
|
.. admonition:: Example:
|
618
623
|
|
@@ -652,6 +657,7 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
652
657
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
653
658
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
654
659
|
#other-client--per-operation-configuration>`_.
|
660
|
+
:returns: A container client for the renamed container.
|
655
661
|
:rtype: ~azure.storage.blob.ContainerClient
|
656
662
|
"""
|
657
663
|
renamed_container = self.get_container_client(new_name)
|
@@ -776,7 +782,8 @@ class BlobServiceClient(StorageAccountHostsMixin, StorageEncryptionMixin):
|
|
776
782
|
"""
|
777
783
|
if isinstance(blob, BlobProperties):
|
778
784
|
warnings.warn(
|
779
|
-
"The use of a 'BlobProperties' instance for param blob is deprecated.
|
785
|
+
"The use of a 'BlobProperties' instance for param blob is deprecated. " +
|
786
|
+
"Please use 'BlobProperties.name' or any other str input type instead.",
|
780
787
|
DeprecationWarning
|
781
788
|
)
|
782
789
|
try:
|
{azure-storage-blob-12.19.0b1 → azure-storage-blob-12.20.0}/azure/storage/blob/_container_client.py
RENAMED
@@ -1,9 +1,9 @@
|
|
1
|
-
# pylint: disable=too-many-lines
|
2
1
|
# -------------------------------------------------------------------------
|
3
2
|
# Copyright (c) Microsoft Corporation. All rights reserved.
|
4
3
|
# Licensed under the MIT License. See License.txt in the project root for
|
5
4
|
# license information.
|
6
5
|
# --------------------------------------------------------------------------
|
6
|
+
# pylint: disable=too-many-lines, docstring-keyword-should-match-keyword-only
|
7
7
|
|
8
8
|
import functools
|
9
9
|
import warnings
|
@@ -65,7 +65,7 @@ def _get_blob_name(blob):
|
|
65
65
|
"""Return the blob name.
|
66
66
|
|
67
67
|
:param blob: A blob string or BlobProperties
|
68
|
-
:
|
68
|
+
:type blob: str or BlobProperties
|
69
69
|
:returns: The name of the blob.
|
70
70
|
:rtype: str
|
71
71
|
"""
|
@@ -202,7 +202,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
202
202
|
- except in the case of AzureSasCredential, where the conflicting SAS tokens will raise a ValueError.
|
203
203
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
204
204
|
should be the storage account key.
|
205
|
-
:
|
205
|
+
:type credential:
|
206
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
207
|
+
~azure.core.credentials.AzureSasCredential or
|
208
|
+
~azure.core.credentials.TokenCredential or
|
209
|
+
str or dict[str, str] or None
|
206
210
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
207
211
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
208
212
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
@@ -251,7 +255,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
251
255
|
Credentials provided here will take precedence over those in the connection string.
|
252
256
|
If using an instance of AzureNamedKeyCredential, "name" should be the storage account name, and "key"
|
253
257
|
should be the storage account key.
|
254
|
-
:
|
258
|
+
:type credential:
|
259
|
+
~azure.core.credentials.AzureNamedKeyCredential or
|
260
|
+
~azure.core.credentials.AzureSasCredential or
|
261
|
+
~azure.core.credentials.TokenCredential or
|
262
|
+
str or dict[str, str] or None
|
255
263
|
:keyword str audience: The audience to use when requesting tokens for Azure Active Directory
|
256
264
|
authentication. Only has an effect when credential is of type TokenCredential. The value could be
|
257
265
|
https://storage.azure.com/ (default) or https://<account>.blob.core.windows.net.
|
@@ -338,13 +346,14 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
338
346
|
:keyword lease:
|
339
347
|
Specify this to perform only if the lease ID given
|
340
348
|
matches the active lease ID of the source container.
|
341
|
-
:
|
349
|
+
:type lease: ~azure.storage.blob.BlobLeaseClient or str
|
342
350
|
:keyword int timeout:
|
343
351
|
Sets the server-side timeout for the operation in seconds. For more details see
|
344
352
|
https://learn.microsoft.com/rest/api/storageservices/setting-timeouts-for-blob-service-operations.
|
345
353
|
This value is not tracked or validated on the client. To configure client-side network timesouts
|
346
354
|
see `here <https://github.com/Azure/azure-sdk-for-python/tree/main/sdk/storage/azure-storage-blob
|
347
355
|
#other-client--per-operation-configuration>`_.
|
356
|
+
:returns: The renamed container client.
|
348
357
|
:rtype: ~azure.storage.blob.ContainerClient
|
349
358
|
"""
|
350
359
|
lease = kwargs.pop('lease', None)
|
@@ -792,8 +801,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
792
801
|
process_storage_error(error)
|
793
802
|
|
794
803
|
@distributed_trace
|
795
|
-
def list_blobs(
|
796
|
-
|
804
|
+
def list_blobs(
|
805
|
+
self, name_starts_with: Optional[str] = None,
|
806
|
+
include: Optional[Union[str, List[str]]] = None,
|
807
|
+
**kwargs: Any
|
808
|
+
) -> ItemPaged[BlobProperties]:
|
797
809
|
"""Returns a generator to list the blobs under the specified container.
|
798
810
|
The generator will lazily follow the continuation tokens returned by
|
799
811
|
the service.
|
@@ -824,6 +836,10 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
824
836
|
:dedent: 8
|
825
837
|
:caption: List the blobs in the container.
|
826
838
|
"""
|
839
|
+
if kwargs.pop('prefix', None):
|
840
|
+
raise ValueError("Passing 'prefix' has no effect on filtering, " +
|
841
|
+
"please use the 'name_starts_with' parameter instead.")
|
842
|
+
|
827
843
|
if include and not isinstance(include, list):
|
828
844
|
include = [include]
|
829
845
|
|
@@ -860,6 +876,10 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
860
876
|
:returns: An iterable (auto-paging) response of blob names as strings.
|
861
877
|
:rtype: ~azure.core.paging.ItemPaged[str]
|
862
878
|
"""
|
879
|
+
if kwargs.pop('prefix', None):
|
880
|
+
raise ValueError("Passing 'prefix' has no effect on filtering, " +
|
881
|
+
"please use the 'name_starts_with' parameter instead.")
|
882
|
+
|
863
883
|
name_starts_with = kwargs.pop('name_starts_with', None)
|
864
884
|
results_per_page = kwargs.pop('results_per_page', None)
|
865
885
|
timeout = kwargs.pop('timeout', None)
|
@@ -881,12 +901,11 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
881
901
|
|
882
902
|
@distributed_trace
|
883
903
|
def walk_blobs(
|
884
|
-
|
885
|
-
|
886
|
-
|
887
|
-
|
888
|
-
):
|
889
|
-
# type: (...) -> ItemPaged[BlobProperties]
|
904
|
+
self, name_starts_with: Optional[str] = None,
|
905
|
+
include: Optional[Union[List[str], str]] = None,
|
906
|
+
delimiter: str = "/",
|
907
|
+
**kwargs: Any
|
908
|
+
) -> ItemPaged[BlobProperties]:
|
890
909
|
"""Returns a generator to list the blobs under the specified container.
|
891
910
|
The generator will lazily follow the continuation tokens returned by
|
892
911
|
the service. This operation will list blobs in accordance with a hierarchy,
|
@@ -914,6 +933,10 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
914
933
|
:returns: An iterable (auto-paging) response of BlobProperties.
|
915
934
|
:rtype: ~azure.core.paging.ItemPaged[~azure.storage.blob.BlobProperties]
|
916
935
|
"""
|
936
|
+
if kwargs.pop('prefix', None):
|
937
|
+
raise ValueError("Passing 'prefix' has no effect on filtering, " +
|
938
|
+
"please use the 'name_starts_with' parameter instead.")
|
939
|
+
|
917
940
|
if include and not isinstance(include, list):
|
918
941
|
include = [include]
|
919
942
|
|
@@ -980,6 +1003,7 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
980
1003
|
|
981
1004
|
:param str name: The blob with which to interact.
|
982
1005
|
:param data: The blob data to upload.
|
1006
|
+
:type data: Union[bytes, str, Iterable[AnyStr], IO[AnyStr]]
|
983
1007
|
:param ~azure.storage.blob.BlobType blob_type: The type of the blob. This can be
|
984
1008
|
either BlockBlob, PageBlob or AppendBlob. The default value is BlockBlob.
|
985
1009
|
:param int length:
|
@@ -1090,7 +1114,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1090
1114
|
"""
|
1091
1115
|
if isinstance(name, BlobProperties):
|
1092
1116
|
warnings.warn(
|
1093
|
-
"The use of a 'BlobProperties' instance for param
|
1117
|
+
"The use of a 'BlobProperties' instance for param name is deprecated. " +
|
1118
|
+
"Please use 'BlobProperties.name' or any other str input type instead.",
|
1094
1119
|
DeprecationWarning
|
1095
1120
|
)
|
1096
1121
|
blob = self.get_blob_client(name)
|
@@ -1177,7 +1202,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1177
1202
|
"""
|
1178
1203
|
if isinstance(blob, BlobProperties):
|
1179
1204
|
warnings.warn(
|
1180
|
-
"The use of a 'BlobProperties' instance for param blob is deprecated.
|
1205
|
+
"The use of a 'BlobProperties' instance for param blob is deprecated. " +
|
1206
|
+
"Please use 'BlobProperties.name' or any other str input type instead.",
|
1181
1207
|
DeprecationWarning
|
1182
1208
|
)
|
1183
1209
|
blob_client = self.get_blob_client(blob) # type: ignore
|
@@ -1302,7 +1328,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1302
1328
|
"""
|
1303
1329
|
if isinstance(blob, BlobProperties):
|
1304
1330
|
warnings.warn(
|
1305
|
-
"The use of a 'BlobProperties' instance for param blob is deprecated.
|
1331
|
+
"The use of a 'BlobProperties' instance for param blob is deprecated. " +
|
1332
|
+
"Please use 'BlobProperties.name' or any other str input type instead.",
|
1306
1333
|
DeprecationWarning
|
1307
1334
|
)
|
1308
1335
|
blob_client = self.get_blob_client(blob) # type: ignore
|
@@ -1776,7 +1803,8 @@ class ContainerClient(StorageAccountHostsMixin, StorageEncryptionMixin): # py
|
|
1776
1803
|
"""
|
1777
1804
|
if isinstance(blob, BlobProperties):
|
1778
1805
|
warnings.warn(
|
1779
|
-
"The use of a 'BlobProperties' instance for param blob is deprecated.
|
1806
|
+
"The use of a 'BlobProperties' instance for param blob is deprecated. " +
|
1807
|
+
"Please use 'BlobProperties.name' or any other str input type instead.",
|
1780
1808
|
DeprecationWarning
|
1781
1809
|
)
|
1782
1810
|
blob_name = _get_blob_name(blob)
|
@@ -186,7 +186,8 @@ class _ChunkDownloader(object): # pylint: disable=too-many-instance-attributes
|
|
186
186
|
# No need to download the empty chunk from server if there's no data in the chunk to be downloaded.
|
187
187
|
# Do optimize and create empty chunk locally if condition is met.
|
188
188
|
if self._do_optimize(download_range[0], download_range[1]):
|
189
|
-
|
189
|
+
data_size = download_range[1] - download_range[0] + 1
|
190
|
+
chunk_data = b"\x00" * data_size
|
190
191
|
else:
|
191
192
|
range_header, range_validation = validate_and_format_range_headers(
|
192
193
|
download_range[0],
|
@@ -235,7 +236,7 @@ class _ChunkIterator(object):
|
|
235
236
|
self._current_content = content
|
236
237
|
self._iter_downloader = downloader
|
237
238
|
self._iter_chunks = None
|
238
|
-
self._complete =
|
239
|
+
self._complete = size == 0
|
239
240
|
|
240
241
|
def __len__(self):
|
241
242
|
return self.size
|
@@ -699,10 +700,10 @@ class StorageStreamDownloader(Generic[T]): # pylint: disable=too-many-instance-
|
|
699
700
|
self._encoding = encoding
|
700
701
|
return self.readall()
|
701
702
|
|
702
|
-
def readinto(self, stream: IO[
|
703
|
+
def readinto(self, stream: IO[bytes]) -> int:
|
703
704
|
"""Download the contents of this file to a stream.
|
704
705
|
|
705
|
-
:param IO[
|
706
|
+
:param IO[bytes] stream:
|
706
707
|
The stream to download to. This can be an open file-handle,
|
707
708
|
or any writable stream. The stream must be seekable if the download
|
708
709
|
uses more than one parallel connection.
|