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?
- Simplified Development: Abstract away complex REST API calls.
- Language Idiomatic: Designed to feel natural within each programming language.
- Performance Optimized: Built for efficient data transfer and resource management.
- Robust Error Handling: Comprehensive mechanisms for managing transient and persistent errors.
- Security: Built-in support for authentication (SAS tokens, Azure AD) and encryption.
- Cross-Platform: Available for major operating systems and development environments.
Available SDKs
Explore the SDKs for your preferred programming language:
Java
Robust SDKs for Java developers, ideal for enterprise applications and backend services.
Learn MorePython
Easy-to-use and powerful SDKs for Python, great for scripting, web applications, and data science.
Learn MoreJavaScript/TypeScript
SDKs for frontend and backend JavaScript/TypeScript development, including Node.js and browser applications.
Learn MoreGetting Started
To get started, choose your language and follow the quickstart guides. You'll typically need to:
- Install the relevant SDK package using your language's package manager (e.g., NuGet for .NET, pip for Python, Maven for Java).
- Obtain your Azure Storage account credentials (connection string or access keys).
- 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.