Client is the main class exposed by the CyborgDB Python SDK. It provides an interface to interact with the CyborgDB vector database service, allowing you to create and manage encrypted indexes.
Constructor
Client instance for connecting to a CyborgDB microservice.
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
base_url | str | - | Base URL of the CyborgDB microservice endpoint |
api_key | str | - | API key for authentication with the microservice |
verify_ssl | bool | None | (Optional) SSL verification. When None, automatically disabled for localhost and http:// URLs |
Example Usage
Error Handling
TheClient class includes comprehensive error handling that processes different types of API errors:
- HTTP Errors: Status codes and response details are logged and converted to meaningful error messages
- Validation Errors: Field validation failures are formatted with detailed information
- Network Errors: Connection and timeout issues are handled gracefully
Type Safety
The Python SDK provides type hints for better development experience:- Type annotations for all method parameters and return values
- IDE support with autocomplete and type checking
- Runtime validation of critical parameters