azure-storage-blob-rustlisted
Install: claude install-skill aiskillstore/marketplace
# Azure Blob Storage SDK for Rust
Client library for Azure Blob Storage — Microsoft's object storage solution for the cloud.
## Installation
```sh
cargo add azure_storage_blob azure_identity
```
## Environment Variables
```bash
AZURE_STORAGE_ACCOUNT_NAME=<storage-account-name>
# Endpoint: https://<account>.blob.core.windows.net/
```
## Authentication
```rust
use azure_identity::DeveloperToolsCredential;
use azure_storage_blob::{BlobClient, BlobClientOptions};
let credential = DeveloperToolsCredential::new(None)?;
let blob_client = BlobClient::new(
"https://<account>.blob.core.windows.net/",
"container-name",
"blob-name",
Some(credential),
Some(BlobClientOptions::default()),
)?;
```
## Client Types
| Client | Purpose |
|--------|---------|
| `BlobServiceClient` | Account-level operations, list containers |
| `BlobContainerClient` | Container operations, list blobs |
| `BlobClient` | Individual blob operations |
## Core Operations
### Upload Blob
```rust
use azure_core::http::RequestContent;
let data = b"hello world";
blob_client
.upload(
RequestContent::from(data.to_vec()),
false, // overwrite
u64::try_from(data.len())?,
None,
)
.await?;
```
### Download Blob
```rust
let response = blob_client.download(None).await?;
let content = response.into_body().collect_bytes().await?;
println!("Content: {:?}", content);
```
### Get Blob Properties
```rust
let properties = blob_client.get_properties(None).a