Skip to main content

Azure Blob Storage Plugin for Search Toolkit

Azure Blob Storage backend for mistralai-search-toolkit.

This plugin implements the Search Toolkit's ObjectStorage interface, enabling the ingestion pipeline to load files directly from Azure Blob Storage.

Installation

pip install mistralai-search-toolkit-storage-azure

Or as an optional dependency of the core package:

pip install mistralai-search-toolkit[storage-azure]

Quick Start: Load Files from Azure in Ingestion Pipeline

1. Upload a File to Azure Blob Storage

import asyncio
from mistralai.search.toolkit.plugins.storage.azure import AzureBlobStorage


async def upload_file():
    storage = AzureBlobStorage(
        container_name="documents",
        account_name="your-account",
    )

    # Upload a file
    with open("document.pdf", "rb") as f:
        data = f.read()

    await storage.put(key="documents/document.pdf", data=data)


asyncio.run(upload_file())

2. Load Files from Azure in Ingestion Pipeline

import asyncio
import os
from mistralai.search.toolkit.ingestion.loaders import FileLoader
from mistralai.search.toolkit.ingestion.pipelines import Pipeline
from mistralai.search.toolkit.ingestion.text_splitters import CharacterTextSplitter
from mistralai.search.toolkit.embedding import MistralEmbedder, MODEL_1024_EMBEDDING
from mistralai.client import Mistral
from mistralai.search.toolkit.plugins.storage.azure import AzureBlobStorage
from mistralai.search.toolkit.plugins.vespa import VespaClientConfig
from vespa_app import app


async def ingest_from_azure():
    # Create Azure storage factory
    def azure_storage_factory():
        return AzureBlobStorage(
            container_name="documents",
            account_name="your-account",
        )

    # Create FileLoader backed by Azure
    file_loader = FileLoader(storage_factory=azure_storage_factory)

    # Create ingestion pipeline
    mistral_client = Mistral(api_key=os.environ.get("MISTRAL_API_KEY"))
    vespa_config = VespaClientConfig(
        endpoint=os.environ.get("VESPA_ENDPOINT", "http://localhost:8080"),
    )
    vector_store = app.get_search_index(vespa_config, collection_name="articles")

    pipeline = Pipeline(
        loader=file_loader,
        text_splitter=CharacterTextSplitter(chunk_size=512),
        embedder=MistralEmbedder(client=mistral_client, model_name=MODEL_1024_EMBEDDING),
        stores=vector_store,
    )

    # Ingest documents from Azure
    num_chunks = await pipeline.run(
        documents=[
            "documents/document1.pdf",
            "documents/document2.pdf",
        ]
    )

    print(f"Indexed {num_chunks} chunks")


asyncio.run(ingest_from_azure())

Configuration

Basic Setup

storage = AzureBlobStorage(
    container_name="documents",
    account_name="your-account",
)

Using Connection String

storage = AzureBlobStorage(
    container_name="documents",
    connection_string="DefaultEndpointsProtocol=https;AccountName=...;AccountKey=...",
)

Using Account Key

storage = AzureBlobStorage(
    container_name="documents",
    account_name="your-account",
    account_key="your-key",
)

Using Managed Identity

from azure.identity.aio import DefaultAzureCredential

storage = AzureBlobStorage(
    container_name="documents",
    account_name="your-account",
    credential=DefaultAzureCredential(),
)

Local Development

For local testing, use Azurite:

docker run -p 10000:10000 mcr.microsoft.com/azure-storage/azurite azurite-blob --blobHost 0.0.0.0

Configure to use local emulator:

storage = AzureBlobStorage(
    container_name="documents",
    connection_string="DefaultEndpointsProtocol=http;AccountName=devstoreaccount1;AccountKey=<key>;BlobEndpoint=http://127.0.0.1:10000/devstoreaccount1/;",
)

License

This plugin is licensed under the Apache License 2.0.

Support

For Search Toolkit issues, refer to the Search Toolkit documentation.

For Azure Blob Storage documentation, visit Azure Blob Storage Docs.

Metadata

Release files for mistralai-search-toolkit-storage-azure 0.0.14

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mistralai-search-toolkit-storage-azure 0.0.14
File Size Uploaded
mistralai_search_toolkit_storage_azure-0.0.14.tar.gz 16.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for mistralai-search-toolkit-storage-azure 0.0.14
File Interpreter ABI Platform
mistralai_search_toolkit_storage_azure-0.0.14-py3-none-any.whl Python 3 none any Details

Total release size: 27.5 kB

Release files / mistralai_search_toolkit_storage_azure-0.0.14.tar.gz

Download URL mistralai_search_toolkit_storage_azure-0.0.14.tar.gz
Size 16.8 kB
Tags Source
SHA-256 checksum
How to use checksums
7b3a02b97343a8a87532aa1217d156f5f086d96c7182dc2d8d2ee5151c5e4334
BLAKE2b-256 checksum
How to use checksums
9d83d2129940d2206bf8af4e526b5b1a94373d63e4f4dfda18a23285a8913237
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release files / mistralai_search_toolkit_storage_azure-0.0.14-py3-none-any.whl

Download URL mistralai_search_toolkit_storage_azure-0.0.14-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
462fdeb45cc68dbc832b2a85a60e735b20eea198ad998735484c125ed71758c8
BLAKE2b-256 checksum
How to use checksums
d7ad33d9833c0aca47fb66d522ffa8137fcd8ca22247cf1ac54a5be93f5a2b8f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 18, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.14 This release

2 release files

0.0.13

2 release files

0.0.12

2 release files

0.0.11

2 release files

0.0.9

2 release files

0.0.8

2 release files

0.0.6

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page