Client
DataBridge
Main client for document operations in DataBridge
Usage
Constructor
Both clients share the same constructor parameters:
Parameters
uri
(str, optional): DataBridge URI in format “databridge://<owner_id>:<token>@<host>”. If not provided, connects to http://localhost:8000 without authentication.timeout
(int, optional): Request timeout in seconds. Defaults to 30.is_local
(bool, optional): Whether connecting to local development server. Defaults to False.
Methods
DataBridge provides the following methods. Each method page includes both synchronous and asynchronous versions.
Document Operations
- ingest_text
- ingest_file
- retrieve_chunks
- retrieve_docs
- query
- list_documents
- get_document
- get_document_by_filename
- update_document_with_text
- update_document_with_file
- update_document_metadata
- update_document_by_filename_with_text
- update_document_by_filename_with_file
- update_document_by_filename_metadata
- batch_get_documents
- batch_get_chunks
Knowledge Graph Operations
Cache Operations
Client Management
Context Manager
Using the DataBridge client as a context manager ensures that resources are properly closed when the context exits.