Azure Storage SDKs

Azure Storage SDKs

The Azure Storage SDKs provide developers with the tools to interact with Azure Storage services (Blob, File, Queue, Table) from their applications. These SDKs are available for a wide range of popular programming languages, enabling seamless integration and efficient data management.

Why Use Azure Storage SDKs?

Available SDKs

Explore the SDKs for your preferred programming language:

.NET

Comprehensive SDKs for .NET applications, including .NET Core and .NET Framework.

Learn More

Java

Robust SDKs for Java developers, ideal for enterprise applications and backend services.

Learn More

Python

Easy-to-use and powerful SDKs for Python, great for scripting, web applications, and data science.

Learn More

JavaScript/TypeScript

SDKs for frontend and backend JavaScript/TypeScript development, including Node.js and browser applications.

Learn More

Go

Efficient and idiomatic SDKs for Go, suitable for high-performance microservices.

Learn More

C++

High-performance C++ SDKs for systems programming and embedded applications.

Learn More

Getting Started

To get started, choose your language and follow the quickstart guides. You'll typically need to:

  1. Install the relevant SDK package using your language's package manager (e.g., NuGet for .NET, pip for Python, Maven for Java).
  2. Obtain your Azure Storage account credentials (connection string or access keys).
  3. Write code to connect to your storage account and perform operations like uploading, downloading, listing, or deleting data.

Example (Python): Uploading a blob


from azure.storage.blob import BlobServiceClient

# Replace with your actual connection string
connection_string = "YOUR_AZURE_STORAGE_CONNECTION_STRING"
container_name = "my-container"
blob_name = "my-blob.txt"
file_path = "local-file-to-upload.txt"

try:
    # Create the BlobServiceClient object
    blob_service_client = BlobServiceClient.from_connection_string(connection_string)

    # Get a client to interact with a specific container
    container_client = blob_service_client.get_container_client(container_name)

    # Create the container if it doesn't exist
    try:
        container_client.create_container()
        print(f"Container '{container_name}' created.")
    except Exception:
        print(f"Container '{container_name}' already exists.")

    # Create a blob client using the container client
    blob_client = container_client.get_blob_client(blob_name)

    # Upload the blob
    with open(file_path, "rb") as data:
        blob_client.upload_blob(data)
    print(f"Blob '{blob_name}' uploaded successfully.")

except Exception as ex:
    print('Exception: {}'.format(ex))
            

For detailed examples and API references, please refer to the official Microsoft Azure documentation for each SDK.