Python SDK Reference
Complete API documentation for the VortexDB Python client.Installation
VortexDB
The main client class for interacting with VortexDB.Constructor
str
default:"localhost:50051"
The gRPC server address. Can also be set via
VORTEXDB_GRPC_URL environment variable.str
default:"None"
Authentication key for the gRPC API. Can also be set via
VORTEXDB_API_KEY environment variable.float
default:"30.0"
Request timeout in seconds. Can also be set via
VORTEXDB_TIMEOUT environment variable.Methods
insert
Insert a vector with its payload into the database.str
UUID of the created point.
batch_insert
Insert multiple vectors in a single request.list[str]
List of UUIDs for the created points, in input order.
get
Retrieve a point by its ID.Point | None
The point if found,
None otherwise.search
Search for the k nearest neighbors to a query vector.SearchQuery
default:"None"
A
SearchQuery object bundling vector, similarity, and limit. Use this or pass individual args.int
default:"None"
Search breadth for HNSW. Uses server default if not set.
List[str]
List of point IDs ordered by similarity (closest first).
batch_search
Search against multiple query vectors in a single request.List[SearchQuery], List[(DenseVector, Similarity, int)], or bare List[DenseVector] with global similarity and limit.
List[List[str]]
One result list per input query.
delete
Delete a point by its ID.close
Close the gRPC connection.Context Manager
The client supports the context manager protocol for automatic cleanup:DenseVector
An immutable dense vector of floating-point values.Constructor
List[float] | Tuple[float, ...]
required
The vector components. Must be non-empty and contain numeric values.
TypeError: If values is not a list or tupleValueError: If values is emptyTypeError: If any value is not numeric
Methods
to_list
Convert the vector to a Python list.Properties
values
Access the vector values (read-only).Payload
Metadata associated with a vector.Factory Methods
text
Create a text payload.image
Create an image payload.Constructor
ContentType
required
The type of content (
ContentType.TEXT or ContentType.IMAGE).str
required
The content string.
Properties
Point
A point returned from the database (vector + payload + ID).Properties
Methods
pretty
Return a formatted string representation.Similarity
Enum for distance/similarity metrics.Values
Example:
ContentType
Enum for payload content types.Values
SearchQuery
Bundles a search’s parameters into a single object.Exceptions
All exceptions inherit fromVortexDBError.
Exception Hierarchy
Example:
Configuration
VortexDBConfig
Internal configuration class (usually not used directly).Environment Variables
Type Hints
The SDK is fully typed. Import types for type hints:Next Steps
SDK Examples
Working code examples
API Reference
gRPC and HTTP API docs