Skip to content
This repository was archived by the owner on Sep 26, 2026. It is now read-only.

Feat/azure blob support - #18

Merged
filis-cadar merged 11 commits into
mainfrom
feat/azure_blob_support
Jul 13, 2026
Merged

filis-cadar merged 11 commits into
mainfrom
feat/azure_blob_support

Conversation

@ChrisPC-39

@ChrisPC-39 ChrisPC-39 commented Jul 3, 2026 •

Copy link
Copy Markdown
Collaborator

Add Azure Blob Storage Provider Support

Summary

Adds native Azure Blob Storage support to chuk-artifacts, providing seamless integration with Microsoft Azure cloud storage alongside existing S3 and IBM COS providers.

New Provider Implementation

  • src/chuk_artifacts/providers/azure_blob.py - Full S3-compatible Azure Blob Storage provider
    • Three authentication methods:
      • Connection string (simple, account key-based)
      • Account name + key (account key-based)
      • Azure AD (Microsoft Entra ID) - identity-based authentication
    • Dual presigned URL generation:
      • Account Key SAS (traditional)
      • User Delegation SAS (Azure AD-based) - works without "Allow Blob anonymous access"
    • Async/await throughout with proper resource cleanup

Dependencies

  • pyproject.toml
    • azure-storage-blob>=12.19.0
    • azure-identity>=1.15.0 (for Azure AD support)

Testing

  • tests/providers/test_azure_blob_provider.py - 17 comprehensive unit tests

    • Factory initialization with multiple credential types
    • Error handling (missing credentials, blob not found)
    • Account Key SAS presigned URL generation
  • tests/providers/test_azure_blob_integration.py - Integration tests

    • Real Azure account testing
    • Azure AD integration test (skipped unless AZURE_USE_AD=true set)
    • Tests upload, download, presigned URLs with Azure AD

Documentation

Updated both:

  • README.md
  • examples/11_azure_blob_quickstart.py

Configuration

Users can now configure Azure Blob Storage with three authentication methods:

Option 1: Connection String (Simple)

export ARTIFACT_PROVIDER=azure_blob
export AZURE_STORAGE_CONNECTION_STRING="DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...;EndpointSuffix=core.windows.net"
export ARTIFACT_BUCKET=my-container

### Option 2: Account Name + Key (Traditional)
```bash
export ARTIFACT_PROVIDER=azure_blob
export AZURE_STORAGE_ACCOUNT_NAME=myaccount
export AZURE_STORAGE_ACCOUNT_KEY=base64key...
export ARTIFACT_BUCKET=my-container

Option 3: Azure AD Authentication

export ARTIFACT_PROVIDER=azure_blob
export AZURE_STORAGE_ACCOUNT_NAME=myaccount
export AZURE_USE_AD=true

# Option 3a: Service Principal (apps/CI/CD)
export AZURE_CLIENT_ID=your-client-id
export AZURE_CLIENT_SECRET=your-client-secret
export AZURE_TENANT_ID=your-tenant-id

# Option 3b: Managed Identity (Azure VM/AKS/Functions)
# No credentials needed - automatic!

# Option 3c: Azure CLI (local development)
# Just run: az login

Chris PC added 10 commits July 3, 2026 16:39
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>
@ChrisPC-39
ChrisPC-39 requested a review from chrishayuk July 7, 2026 08:31
Comment thread README.md Outdated
Comment on lines +209 to +218
**With optional cloud storage providers:**

```bash
# Azure Blob Storage
pip install chuk-artifacts[azure]

# All extras together
pip install chuk-artifacts[azure]
```

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. pyproject.toml adds both azure packages to core dependencies and no [project.optional-dependencies] azure group is defined (the repo only has a dev extra). I think this example can be removed as long as they are not valid.

Comment thread README.md

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also at ## Examples tab we can add example referencing to 11_azure_blob_quickstart.py file.

Comment thread src/chuk_artifacts/provider_factory.py Outdated
Comment on lines 102 to 108
"filesystem",
"s3",
"ibm_cos",
"azure_blob",
"vfs",
"vfs-memory",
"vfs-filesystem",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not related to your changes, maybe it is better to use StorageProvider enum type from types.py instead of updating available list

@krialm krialm left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No critical blockers found, only minor improvements suggested

Signed-off-by: Chris PC <chrispc@li-4dc2bf4c-325d-11b2-a85c-b68e8b1fc307.ibm.com>

@madhav165 madhav165 left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR looks good. Follows the patterns established for S3 storage.

Minor observation: azure dependencies would always be installed even if not being configured with the current pyproject.toml.

@filis-cadar
filis-cadar merged commit 6c60d95 into main Jul 13, 2026
10 checks passed
@filis-cadar
filis-cadar deleted the feat/azure_blob_support branch July 13, 2026 09:07
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants