You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: articles/storage/blobs/storage-quickstart-blobs-python.md
+17-17Lines changed: 17 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,7 @@ This command clones the *Azure-Samples/storage-blobs-python-quickstart* reposito
41
41
In the application, provide your storage account name and account key to create a `BlockBlobService` object. Open the *example.py* file from the Solution Explorer in your IDE. Replace the `accountname` and `accountkey` values with your account name and key.
@@ -88,11 +88,11 @@ Once you have the Cloud Blob container, instantiate the **CloudBlockBlob** objec
88
88
In this section, you instantiate the objects, create a new container, and then set permissions on the container so the blobs are public. The container is called **quickstartblobs**.
89
89
90
90
```python
91
-
# Create the BlockBlockService that is used to call the Blob service for the storage account
Blob storage supports block blobs, append blobs, and page blobs. Block blobs are the most commonly used, and that's what is used in this quickstart.
104
104
105
-
To upload a file to a blob, get the full file path by joining the directory name with the file name on your local drive. You can then upload the file to the specified path using the `create\_blob\_from\_path` method.
105
+
To upload a file to a blob, get the full file path by joining the directory name with the file name on your local drive. You can then upload the file to the specified path using the `create_blob_from_path` method.
106
106
107
-
The sample code creates a local file to be used for the upload and download, storing the file to be uploaded as `file\_path\_to\_file` and the name of the blob as `local\_file\_name`. The following example uploads the file to your container called **quickstartblobs**.
107
+
The sample code creates a local file to be used for the upload and download, storing the file to be uploaded as *full_path_to_file* and the name of the blob as *local_file_name*. The following example uploads the file to your container called **quickstartblobs**.
108
108
109
109
```python
110
110
# Create a file in Documents to test the upload and download.
There are several upload methods that you can use with Blob storage. For example, if you have a memory stream, you can use the `create\_blob\_from\_stream` method rather than `create\_blob\_from\_path`.
127
+
There are several upload methods that you can use with Blob storage. For example, if you have a memory stream, you can use the `create_blob_from_stream` method rather than `create_blob_from_path`.
128
128
129
129
Block blobs can be as large as 4.7 TB, and can be anything from Excel spreadsheets to large video files. Page blobs are primarily used for the VHD files that back IaaS VMs. Append blobs are used for logging, such as when you want to write to a file and then keep adding more information. Most objects stored in Blob storage are block blobs.
130
130
@@ -133,7 +133,7 @@ Block blobs can be as large as 4.7 TB, and can be anything from Excel spreadshee
133
133
Get a list of files in the container with the `list_blobs` method. This method returns a generator. The following code retrieves the list of blobs—then loops through them—showing the names of the blobs found in a container.
Download blobs to your local disk using `the get\_blob\_to\_path` method.
145
+
Download blobs to your local disk using the `get_blob_to_path` method.
146
146
The following code downloads the blob uploaded in a previous section. *_DOWNLOADED* is added as a suffix to the blob name so you can see both files on local disk.
147
147
148
148
```python
149
149
# Download the blob(s).
150
150
# Add '_DOWNLOADED' as prefix to '.txt' so you can see both files in Documents.
If you no longer need the blobs uploaded in this quickstart, you can delete the entire container using the `delete\_container` method. To delete individual files instead, use the `delete\_blob` method.
157
+
If you no longer need the blobs uploaded in this quickstart, you can delete the entire container using the `delete_container` method. To delete individual files instead, use the `delete_blob` method.
158
158
159
159
```python
160
-
# Clean up resources. This includes the container and the temp files
160
+
# Clean up resources. This includes the container and the temp files.
0 commit comments