Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Azure Storage Blob Track2 #5896

Merged
merged 27 commits into from
Jul 2, 2019
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
a50a17f
Storage blob track2 (#5894)
annatisch Jun 17, 2019
48a64a2
Packaging update of azure-storage-blob
AutorestCI Jun 17, 2019
ad382f3
Fixes to storage dependencies in CI (#5900)
annatisch Jun 18, 2019
8756445
Packaging update of azure-storage-blob
AutorestCI Jun 18, 2019
c35aa71
Revert "Packaging update of azure-storage-blob"
scbedd Jun 18, 2019
9897728
reverting 66d68773cb59db01742ff5dac64d0792577c8d91. adding sdk_packag…
scbedd Jun 18, 2019
c2a3b1e
docstrings for blobs (#5954)
kristapratico Jun 19, 2019
9101681
[storage-blob] Refactor shared code (#5960)
annatisch Jun 19, 2019
c12750d
Fix setup.py version
annatisch Jun 19, 2019
28906f2
Missing recordings
annatisch Jun 19, 2019
422ecaf
Fix storage SDK conflict
annatisch Jun 19, 2019
df844f7
Packaging update of azure-eventhubs
AutorestCI Jun 19, 2019
cd38d92
Revert "Packaging update of azure-eventhubs"
annatisch Jun 19, 2019
63d229a
Fix EH packaging
annatisch Jun 19, 2019
6d7adea
Updated shared code
annatisch Jun 22, 2019
f593164
Review feedback
annatisch Jun 22, 2019
1814537
[azure-storage-blob] Policy updates + simple upload/download (#6162)
annatisch Jun 28, 2019
928c887
Merge remote-tracking branch 'origin/master' into azure-storage-blob-…
annatisch Jun 28, 2019
6cbe36f
Removed old python tags
annatisch Jun 28, 2019
38be077
Merge remote-tracking branch 'origin/master' into azure-storage-blob-…
annatisch Jun 28, 2019
45530ba
Code samples for blobs (#6093)
kristapratico Jun 28, 2019
9418c89
Storage Blobs Readme [wip] (#6011)
kristapratico Jun 28, 2019
63b0a9a
Fix CI
annatisch Jun 28, 2019
80b5e3c
[Storage Blob] pylint + mypy passs (#6175)
Jun 29, 2019
7bf5cf0
[storage-blob] Docs updates (#6184)
annatisch Jul 1, 2019
460226c
Merge remote-tracking branch 'origin/master' into azure-storage-blob-…
annatisch Jul 1, 2019
c95a6cb
[storage-blob] Test rename (#6197)
annatisch Jul 2, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
[storage-blob] Test rename (#6197)
* Test rename

* Removed test init files

* More renames

* Try flattening tests

* Blob test imports

* Flattened queue tests

* Renamed queue test case
annatisch authored Jul 2, 2019

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
commit c95a6cb0a061f602d4bbf46d8a62fdbc7f157760
10 changes: 5 additions & 5 deletions sdk/storage/azure-storage-blob/README.md
Original file line number Diff line number Diff line change
@@ -162,27 +162,27 @@ Get started with our [Blob samples](https://github.com/Azure/azure-sdk-for-pytho

Several Storage Blobs Python SDK samples are available to you in the SDK's GitHub repository. These samples provide example code for additional scenarios commonly encountered while working with Storage Blobs:

* [`test_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_hello_world.py) - Examples for common Storage Blob tasks:
* [`test_blob_samples_hello_world.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_hello_world.py) - Examples for common Storage Blob tasks:
* Set up a container
* Create a block, page, or append blob
* Upload blobs
* Download blobs
* Delete blobs

* [`test_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_authentication.py) - Examples for authenticating and creating the client:
* [`test_blob_samples_authentication.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_authentication.py) - Examples for authenticating and creating the client:
* From a connection string
* From a shared access key
* From a shared access signature token
* From active directory

* [`test_samples_blob_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_blob_service.py) - Examples for interacting with the blob service:
* [`test_blob_samples_service.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_service.py) - Examples for interacting with the blob service:
* Get account information
* Get and set service properties
* Get service statistics
* Create, list, and delete containers
* Get the Blob or Container client

* [`test_samples_containers.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_containers.py) - Examples for interacting with containers:
* [`test_blob_samples_containers.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_containers.py) - Examples for interacting with containers:
* Create a container and delete containers
* Set metadata on containers
* Get container properties
@@ -191,7 +191,7 @@ Several Storage Blobs Python SDK samples are available to you in the SDK's GitHu
* Upload, list, delete blobs in container
* Get the blob client to interact with a specific blob

* [`test_samples_common_blobs.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/samples/test_samples_common_blobs.py) - Examples common to all types of blobs:
* [`test_blob_samples_common.py`](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/tests/test_blob_samples_common.py) - Examples common to all types of blobs:
* Create a snapshot
* Delete a blob snapshot
* Soft delete a blob
20 changes: 10 additions & 10 deletions sdk/storage/azure-storage-blob/azure/storage/blob/blob_client.py
Original file line number Diff line number Diff line change
@@ -108,14 +108,14 @@ class BlobClient(StorageAccountHostsMixin): # pylint: disable=too-many-public-m
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_client]
:end-before: [END create_blob_client]
:language: python
:dedent: 8
:caption: Creating the BlobClient from a URL to a public blob (no auth needed).

.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_client_sas_url]
:end-before: [END create_blob_client_sas_url]
:language: python
@@ -211,7 +211,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string_blob]
:end-before: [END auth_from_connection_string_blob]
:language: python
@@ -427,7 +427,7 @@ def upload_blob( # pylint: disable=too-many-locals
:rtype: dict[str, Any]

Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START upload_a_blob]
:end-before: [END upload_a_blob]
:language: python
@@ -592,7 +592,7 @@ def download_blob(
:rtype: ~azure.storage.blob._blob_utils.StorageStreamDownloader

Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START download_a_blob]
:end-before: [END download_a_blob]
:language: python
@@ -682,7 +682,7 @@ def delete_blob(
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_hello_world.py
.. literalinclude:: ../tests/test_blob_samples_hello_world.py
:start-after: [START delete_blob]
:end-before: [END delete_blob]
:language: python
@@ -719,7 +719,7 @@ def undelete_blob(self, timeout=None, **kwargs):
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START undelete_blob]
:end-before: [END undelete_blob]
:language: python
@@ -775,7 +775,7 @@ def get_blob_properties(
:rtype: ~azure.storage.blob.models.BlobProperties

Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START get_blob_properties]
:end-before: [END get_blob_properties]
:language: python
@@ -1170,7 +1170,7 @@ def create_snapshot( # type: ignore
:rtype: dict[str, Any]

Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START create_blob_snapshot]
:end-before: [END create_blob_snapshot]
:language: python
@@ -1447,7 +1447,7 @@ def acquire_lease(
:rtype: ~azure.storage.blob.lease.LeaseClient

Example:
.. literalinclude:: ../tests/samples/test_samples_common_blobs.py
.. literalinclude:: ../tests/test_blob_samples_common.py
:start-after: [START acquire_lease_on_blob]
:end-before: [END acquire_lease_on_blob]
:language: python
Original file line number Diff line number Diff line change
@@ -82,14 +82,14 @@ class BlobServiceClient(StorageAccountHostsMixin):
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_service_client]
:end-before: [END create_blob_service_client]
:language: python
:dedent: 8
:caption: Creating the BlobServiceClient with account url and credential.

.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_blob_service_client_oauth]
:end-before: [END create_blob_service_client_oauth]
:language: python
@@ -141,7 +141,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string]
:end-before: [END auth_from_connection_string]
:language: python
@@ -203,7 +203,7 @@ def generate_shared_access_signature(
:rtype: str

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START create_sas_token]
:end-before: [END create_sas_token]
:language: python
@@ -228,7 +228,7 @@ def get_account_information(self, **kwargs): # type: ignore
:rtype: dict(str, str)

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_account_info]
:end-before: [END get_blob_service_account_info]
:language: python
@@ -266,7 +266,7 @@ def get_service_stats(self, timeout=None, **kwargs): # type: ignore
:rtype: ~azure.storage.blob._generated.models.StorageServiceStats

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_stats]
:end-before: [END get_blob_service_stats]
:language: python
@@ -289,7 +289,7 @@ def get_service_properties(self, timeout=None, **kwargs):
:rtype: ~azure.storage.blob._generated.models.StorageServiceProperties

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START get_blob_service_properties]
:end-before: [END get_blob_service_properties]
:language: python
@@ -356,7 +356,7 @@ def set_service_properties(
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START set_blob_service_properties]
:end-before: [END set_blob_service_properties]
:language: python
@@ -410,7 +410,7 @@ def list_containers(
:rtype: ~azure.core.blob.models.ContainerPropertiesPaged

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_list_containers]
:end-before: [END bsc_list_containers]
:language: python
@@ -454,7 +454,7 @@ def create_container(
:rtype: ~azure.storage.blob.container_client.ContainerClient

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_create_container]
:end-before: [END bsc_create_container]
:language: python
@@ -516,7 +516,7 @@ def delete_container(
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_delete_container]
:end-before: [END bsc_delete_container]
:language: python
@@ -547,7 +547,7 @@ def get_container_client(self, container):
:rtype: ~azure.core.blob.container_client.ContainerClient

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_get_container_client]
:end-before: [END bsc_get_container_client]
:language: python
@@ -587,7 +587,7 @@ def get_blob_client(
:rtype: ~azure.storage.blob.blob_client.BlobClient

Example:
.. literalinclude:: ../tests/samples/test_samples_blob_service.py
.. literalinclude:: ../tests/test_blob_samples_service.py
:start-after: [START bsc_get_blob_client]
:end-before: [END bsc_get_blob_client]
:language: python
Original file line number Diff line number Diff line change
@@ -94,14 +94,14 @@ class ContainerClient(StorageAccountHostsMixin):
If the URL already has a SAS token, specifying an explicit credential will take priority.

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container_client_from_service]
:end-before: [END create_container_client_from_service]
:language: python
:dedent: 12
:caption: Get a ContainerClient from an existing BlobSericeClient.

.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container_client_sasurl]
:end-before: [END create_container_client_sasurl]
:language: python
@@ -170,7 +170,7 @@ def from_connection_string(
Credentials provided here will take precedence over those in the connection string.

Example:
.. literalinclude:: ../tests/samples/test_samples_authentication.py
.. literalinclude:: ../tests/test_blob_samples_authentication.py
:start-after: [START auth_from_connection_string_container]
:end-before: [END auth_from_connection_string_container]
:language: python
@@ -254,7 +254,7 @@ def generate_shared_access_signature(
:rtype: str

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START generate_sas_token]
:end-before: [END generate_sas_token]
:language: python
@@ -296,7 +296,7 @@ def create_container(self, metadata=None, public_access=None, timeout=None, **kw
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START create_container]
:end-before: [END create_container]
:language: python
@@ -359,7 +359,7 @@ def delete_container(
:rtype: None

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START delete_container]
:end-before: [END delete_container]
:language: python
@@ -428,7 +428,7 @@ def acquire_lease(
:rtype: ~azure.storage.blob.lease.LeaseClient

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START acquire_lease_on_container]
:end-before: [END acquire_lease_on_container]
:language: python
@@ -475,7 +475,7 @@ def get_container_properties(self, lease=None, timeout=None, **kwargs):
:rtype: ~azure.storage.blob.models.ContainerProperties

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_container_properties]
:end-before: [END get_container_properties]
:language: python
@@ -525,7 +525,7 @@ def set_container_metadata( # type: ignore
:returns: Container-updated property dict (Etag and last modified).

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START set_container_metadata]
:end-before: [END set_container_metadata]
:language: python
@@ -561,7 +561,7 @@ def get_container_access_policy(self, lease=None, timeout=None, **kwargs):
:rtype: dict[str, str]

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_container_access_policy]
:end-before: [END get_container_access_policy]
:language: python
@@ -623,7 +623,7 @@ def set_container_access_policy(
:returns: Container-updated property dict (Etag and last modified).

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START set_container_access_policy]
:end-before: [END set_container_access_policy]
:language: python
@@ -680,7 +680,7 @@ def list_blobs(self, name_starts_with=None, include=None, marker=None, timeout=N
:rtype: ~azure.storage.blob.models.BlobPropertiesPaged

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START list_blobs_in_container]
:end-before: [END list_blobs_in_container]
:language: python
@@ -850,7 +850,7 @@ def upload_blob(
:rtype: ~azure.storage.blob.blob_cient.BlobClient

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START upload_blob_to_container]
:end-before: [END upload_blob_to_container]
:language: python
@@ -975,7 +975,7 @@ def get_blob_client(
:rtype: ~azure.storage.blob.blob_client.BlobClient

Example:
.. literalinclude:: ../tests/samples/test_samples_containers.py
.. literalinclude:: ../tests/test_blob_samples_containers.py
:start-after: [START get_blob_client]
:end-before: [END get_blob_client]
:language: python
1 change: 0 additions & 1 deletion sdk/storage/azure-storage-blob/tests/__init__.py

This file was deleted.

Empty file.
Empty file.
Loading