Skip to main content

LlamaIndex Index_Store Integration: Azure Table Storage

AzureIndexStore utilizes Azure Table Storage and Cosmos DB to provide an index storage solution for indexing documents or data.

Installation

Before using the AzureIndexStore, ensure you have Python installed and then proceed to install the required packages:

pip install llama-index-storage-index-store-azure
pip install azure-data-tables
pip install azure-identity  # Only needed for AAD token authentication

Initializing AzureIndexStore

AzureIndexStore can be initialized in several ways depending on the authentication method and the Azure service (Table Storage or Cosmos DB) you are using:

1. Using a Connection String

from llama_index.storage.index_store.azure import AzureIndexStore
from llama_index.storage.kvstore.azure.base import ServiceMode

store = AzureIndexStore.from_connection_string(
    connection_string="your_connection_string_here",
    namespace="your_namespace",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)

2. Using Account Name and Key

store = AzureIndexStore.from_account_and_key(
    account_name="your_account_name",
    account_key="your_account_key",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)

3. Using SAS Token

store = AzureIndexStore.from_sas_token(
    endpoint="your_endpoint",
    sas_token="your_sas_token",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)

4. Using Azure Active Directory (AAD) Token

store = AzureIndexStore.from_aad_token(
    endpoint="your_endpoint",
    service_mode=ServiceMode.STORAGE,  # or ServiceMode.COSMOS
)

End-to-end example:

from llama_index.core import SimpleDirectoryReader, StorageContext
from llama_index.core.node_parser import SentenceSplitter
from llama_index.core import VectorStoreIndex

reader = SimpleDirectoryReader("./data/paul_graham/")
documents = reader.load_data()
nodes = SentenceSplitter().get_nodes_from_documents(documents)

storage_context = StorageContext.from_defaults(
    index_store=AzureIndexStore.from_account_and_key(
        "your_account_name",
        "your_account_key",
        service_mode=ServiceMode.STORAGE,
    ),
)

storage_context.docstore.add_documents(nodes)

keyword_table_index = SimpleKeywordTableIndex(
    nodes, storage_context=storage_context
)

vector_index = VectorStoreIndex(nodes, storage_context=storage_context)

Metadata

Release files for llama-index-storage-index-store-azure 0.7.0

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

Source distribution (sdist)

Source distribution for llama-index-storage-index-store-azure 0.7.0
File Size Uploaded Provenance Actions
llama_index_storage_index_store_azure-0.7.0.tar.gz 4.3 kB Without provenance Details for llama_index_storage_index_store_azure-0.7.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for llama-index-storage-index-store-azure 0.7.0
File Interpreter ABI Platform Actions
llama_index_storage_index_store_azure-0.7.0-py3-none-any.whl Python 3 none any Details for llama_index_storage_index_store_azure-0.7.0-py3-none-any.whl

Total release size: 8.3 kB

Release files / llama_index_storage_index_store_azure-0.7.0.tar.gz

Download URL llama_index_storage_index_store_azure-0.7.0.tar.gz
Size 4.3 kB
Tags Source
SHA-256 checksum
How to use checksums
8630035387a6b5ebedc88e11eccff779b24b84c5edfbcfd635f9f2269f1bf095
BLAKE2b-256 checksum
How to use checksums
d44c91cc147945e6c7e4eb5c0329eac8259d33026f65ec1ce8672051dc42027f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / llama_index_storage_index_store_azure-0.7.0-py3-none-any.whl

Download URL llama_index_storage_index_store_azure-0.7.0-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
36e43a63362eac2bd46be92c575acfa261f2edc20d5202254029cd981100c71f
BLAKE2b-256 checksum
How to use checksums
abaa2283d34ff7079ef8553af3915b5f65a40b00dcbdc65a7f68557c6cffe59a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.7 {"installer":{"name":"uv","version":"0.12.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for llama-index-storage-index-store-azure 0.7.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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