Skip to content

Azure

obstore.auth.azure.DEFAULT_SCOPES module-attribute

DEFAULT_SCOPES = ('https://storage.azure.com/.default',)

Default scopes used for Azure credential providers.

obstore.auth.azure.AzureCredentialProvider

A CredentialProvider for AzureStore that uses azure.identity.

This credential provider uses azure-identity, and will error if this cannot be imported.

Example:

from obstore.auth.azure import AzureCredentialProvider
from obstore.store import AzureStore

credential_provider = AzureCredentialProvider(credential=...)
store = AzureStore("container", credential_provider=credential_provider)

__init__

Create a new AzureCredentialProvider.

Parameters:

__call__

__call__() -> AzureCredential

Fetch the credential.

obstore.auth.azure.AzureAsyncCredentialProvider

An async CredentialProvider for AzureStore that uses azure.identity.

This credential provider uses azure-identity and aiohttp, and will error if these cannot be imported.

Example:

import asyncio
import obstore
from obstore.auth.azure import AzureAsyncCredentialProvider
from obstore.store import AzureStore

credential_provider = AzureAsyncCredentialProvider(credential=...)
store = AzureStore("container", credential_provider=credential_provider)

async def fetch_blobs():
    blobs = await obstore.list(store).collect_async()
    print(blobs)

asyncio.run(fetch_blobs())

__init__

Create a new AzureAsyncCredentialProvider.

Parameters:

__call__ async

__call__() -> AzureCredential

Fetch the credential.