Skip to content

Commit

Permalink
Update the readme to point to the samples in the mono-repo that do th…
Browse files Browse the repository at this point in the history
…e same thing (#23)
  • Loading branch information
v-xuto authored Sep 20, 2020
1 parent e4ccb6a commit 1bcb2e4
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 127 deletions.
46 changes: 26 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,14 @@ urlFragment: upload-download-blobs-python

# How to upload and download blobs from Azure Blob Storage with Python

## SDK Versions
In this sample, you will find the following folders:
* **v11** - references Storage Blobs SDK v11
* **v12** - references Storage Blobs SDK v12
## This sample shows how to do the following operations of Storage Blobs with Storage SDK
- Create a Storage Account using the Azure Portal.
- Create a container.
- Upload a file to block blob.
- List blobs.
- Download a blob to file.
- Delete a blob.
- Delete the container.

## Prerequisites

Expand Down Expand Up @@ -58,35 +62,37 @@ setx AZURE_STORAGE_CONNECTIONSTRING "<YourConnectionString>"
```

### Set up

First, clone the repository on your machine:

```bash
git clone https://github.com/Azure-Samples/azure-sdk-for-python-storage-blob-upload-download.git
```

Then, switch to the appropriate folder:
Then, install the dependencies:

```bash
cd v11
pip install -r requirements.txt
```
or

Finally, execute the following command to run this sample:
```bash
cd v12
python example.py
```

Finally, install the dependencies:
### Use latest Storage SDK

```bash
pip install
```
The storage SDK package version here is **2.x.x**, if you are using the [latest](https://pypi.org/project/azure-storage-blob/) version of the storage SDK package, please reference to the following examples:

## This sample shows how to do the following operations of Storage Blobs
- Create a Storage Account using the Azure Portal.
- Create a container.
- Upload a file to block blob.
- List blobs.
- Download a blob to file.
- Delete a blob.
- Delete the container.
* [blob_samples_hello_world.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/samples/blob_samples_hello_world.py) - Examples for common Storage Blob tasks:
* Create a container
* Create a block, page, or append blob
* Upload a file to blob
* Download a blob
* Delete a blob
* Delete the container
* [blob_samples_enumerate_blobs.py](https://github.com/Azure/azure-sdk-for-python/tree/master/sdk/storage/azure-storage-blob/samples/blob_samples_enumerate_blobs.py)- Examples to enumerate blobs
* List blobs.

## Contributing

Expand Down
File renamed without changes.
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
azure-storage-blob==2.1.0
107 changes: 0 additions & 107 deletions v12/example.py

This file was deleted.

0 comments on commit 1bcb2e4

Please sign in to comment.