LlamaIndex Python Client

raw JSON →
0.1.19 verified Mon Apr 27 auth: no python

Official Python client for LlamaIndex cloud API, version 0.1.19. Provides easy access to LlamaCloud services like indexing, querying, and managing documents. Released as needed.

pip install llamaindex-py-client
error ModuleNotFoundError: No module named 'llamaindex_py_client'
cause The package installs as 'llama_index_cloud', not 'llamaindex_py_client'.
fix
Use 'from llama_index_cloud import ...' instead of 'from llamaindex_py_client import ...'.
error AttributeError: module 'llama_index_cloud' has no attribute 'LlamaCloudIndex'
cause Outdated version or wrong import path. LlamaCloudIndex may be in submodule.
fix
Check docs: import from 'llama_index_cloud' directly for classes.
deprecated The module 'llamaindex_py_client' is deprecated. Use 'llama_index_cloud' instead.
fix Replace imports from 'llamaindex_py_client' with 'llama_index_cloud'.
breaking Breaking change: API endpoints and response formats changed in v0.1.0.
fix Update to v0.1.0+ and adjust code accordingly.

Initialize a cloud index with API key from environment.

import os
from llama_index_cloud import LlamaCloudIndex

api_key = os.environ.get('LLAMA_CLOUD_API_KEY', '')
index = LlamaCloudIndex(
    name="my_index",
    project_name="my_project",
    api_key=api_key
)
print(index.name)