List Data Sources
data_sources.list(DataSourceListParams**kwargs) -> DataSourceListResponse
GET/api/v1/data-sources
List data sources for a given project. If project_id is not provided, uses the default project.
ReturnsExpand Collapse
List[DataSource]
List[DataSource]
component: Component
component: Component
Component that implements the data source
One of the following:
class CloudAzStorageBlobDataSource: …
class CloudAzStorageBlobDataSource: …
class CloudSharepointDataSource: …
class CloudSharepointDataSource: …
exclude_path_patterns: Optional[List[str]]
exclude_path_patterns: Optional[List[str]]
List of regex patterns for file paths to exclude. Files whose paths (including filename) match any pattern will be excluded. Example: [‘/temp/’, ‘/backup/’, ‘.git/’, ‘.tmp$’, ’^~’]
class CloudConfluenceDataSource: …
class CloudConfluenceDataSource: …
class CloudJiraDataSource: …
class CloudJiraDataSource: …
class CloudJiraDataSourceV2: …
class CloudJiraDataSourceV2: …
class CloudBoxDataSource: …
class CloudBoxDataSource: …
List Data Sources
import os
from llama_cloud import LlamaCloud
client = LlamaCloud(
api_key=os.environ.get("LLAMA_CLOUD_API_KEY"), # This is the default and can be omitted
)
data_sources = client.data_sources.list()
print(data_sources)[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}
]Returns Examples
[
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"component": {
"foo": "bar"
},
"name": "name",
"project_id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e",
"source_type": "S3",
"created_at": "2019-12-27T18:11:19.117Z",
"custom_metadata": {
"foo": {
"foo": "bar"
}
},
"updated_at": "2019-12-27T18:11:19.117Z",
"version_metadata": {
"reader_version": "1.0"
}
}
]