Shortcuts

qdrant_client.qdrant_remote module

class QdrantRemote(url: Optional[str] = None, port: Optional[int] = 6333, grpc_port: int = 6334, prefer_grpc: bool = False, https: Optional[bool] = None, api_key: Optional[str] = None, prefix: Optional[str] = None, timeout: Optional[int] = None, host: Optional[str] = None, grpc_options: Optional[Dict[str, Any]] = None, **kwargs: Any)[source]

Bases: QdrantBase

batch_update_points(collection_name: str, update_operations: Sequence[Union[UpsertOperation, DeleteOperation, SetPayloadOperation, OverwritePayloadOperation, DeletePayloadOperation, ClearPayloadOperation, UpdateVectorsOperation, DeleteVectorsOperation]], wait: bool = True, ordering: Optional[WriteOrdering] = None, **kwargs: Any) List[UpdateResult][source]
clear_payload(collection_name: str, points_selector: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
close(grpc_grace: Optional[float] = None, **kwargs: Any) None[source]
collection_exists(collection_name: str, **kwargs: Any) bool[source]
count(collection_name: str, count_filter: Optional[Union[Filter, Filter]] = None, exact: bool = True, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) CountResult[source]
create_collection(collection_name: str, vectors_config: Union[VectorParams, Mapping[str, VectorParams]], shard_number: Optional[int] = None, replication_factor: Optional[int] = None, write_consistency_factor: Optional[int] = None, on_disk_payload: Optional[bool] = None, hnsw_config: Optional[Union[HnswConfigDiff, HnswConfigDiff]] = None, optimizers_config: Optional[Union[OptimizersConfigDiff, OptimizersConfigDiff]] = None, wal_config: Optional[Union[WalConfigDiff, WalConfigDiff]] = None, quantization_config: Optional[Union[ScalarQuantization, ProductQuantization, BinaryQuantization, QuantizationConfig]] = None, init_from: Optional[Union[InitFrom, str]] = None, timeout: Optional[int] = None, sparse_vectors_config: Optional[Mapping[str, SparseVectorParams]] = None, sharding_method: Optional[ShardingMethod] = None, **kwargs: Any) bool[source]
create_full_snapshot(wait: bool = True, **kwargs: Any) SnapshotDescription[source]
create_payload_index(collection_name: str, field_name: str, field_schema: Optional[Union[PayloadSchemaType, TextIndexParams, IntegerIndexParams, int, PayloadIndexParams]] = None, field_type: Optional[Union[PayloadSchemaType, TextIndexParams, IntegerIndexParams, int, PayloadIndexParams]] = None, wait: bool = True, ordering: Optional[WriteOrdering] = None, **kwargs: Any) UpdateResult[source]
create_shard_key(collection_name: str, shard_key: Union[str[str], int[int]], shards_number: Optional[int] = None, replication_factor: Optional[int] = None, placement: Optional[List[int]] = None, timeout: Optional[int] = None, **kwargs: Any) bool[source]
create_shard_snapshot(collection_name: str, shard_id: int, wait: bool = True, **kwargs: Any) Optional[SnapshotDescription][source]
create_snapshot(collection_name: str, wait: bool = True, **kwargs: Any) Optional[SnapshotDescription][source]
delete(collection_name: str, points_selector: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
delete_collection(collection_name: str, timeout: Optional[int] = None, **kwargs: Any) bool[source]
delete_full_snapshot(snapshot_name: str, wait: bool = True, **kwargs: Any) Optional[bool][source]
delete_payload(collection_name: str, keys: Sequence[str], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
delete_payload_index(collection_name: str, field_name: str, wait: bool = True, ordering: Optional[WriteOrdering] = None, **kwargs: Any) UpdateResult[source]
delete_shard_key(collection_name: str, shard_key: Union[str[str], int[int]], timeout: Optional[int] = None, **kwargs: Any) bool[source]
delete_shard_snapshot(collection_name: str, shard_id: int, snapshot_name: str, wait: bool = True, **kwargs: Any) Optional[bool][source]
delete_snapshot(collection_name: str, snapshot_name: str, wait: bool = True, **kwargs: Any) Optional[bool][source]
delete_vectors(collection_name: str, vectors: Sequence[str], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
discover(collection_name: str, target: Optional[Union[int[int], str[str], List[float[float]], SparseVector, TargetVector]] = None, context: Optional[Sequence[Union[ContextExamplePair, ContextExamplePair]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = None, limit: int = 10, offset: int = 0, with_payload: Union[bool, List[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, List[str]] = False, using: Optional[str] = None, lookup_from: Optional[Union[LookupLocation, LookupLocation]] = None, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, timeout: Optional[int] = None, **kwargs: Any) List[ScoredPoint][source]
discover_batch(collection_name: str, requests: Sequence[Union[DiscoverRequest, DiscoverPoints]], consistency: Optional[Union[int[int], ReadConsistencyType]] = None, timeout: Optional[int] = None, **kwargs: Any) List[List[ScoredPoint]][source]
get_aliases(**kwargs: Any) CollectionsAliasesResponse[source]
get_collection(collection_name: str, **kwargs: Any) CollectionInfo[source]
get_collection_aliases(collection_name: str, **kwargs: Any) CollectionsAliasesResponse[source]
get_collections(**kwargs: Any) CollectionsResponse[source]
get_locks(**kwargs: Any) LocksOption[source]
list_full_snapshots(**kwargs: Any) List[SnapshotDescription][source]
list_shard_snapshots(collection_name: str, shard_id: int, **kwargs: Any) List[SnapshotDescription][source]
list_snapshots(collection_name: str, **kwargs: Any) List[SnapshotDescription][source]
lock_storage(reason: str, **kwargs: Any) LocksOption[source]
overwrite_payload(collection_name: str, payload: Dict[str, Any], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
recommend(collection_name: str, positive: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, negative: Optional[Sequence[Union[int[int], str[str], List[float[float]], SparseVector]]] = None, query_filter: Optional[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = None, limit: int = 10, offset: int = 0, with_payload: Union[bool, List[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, List[str]] = False, score_threshold: Optional[float] = None, using: Optional[str] = None, lookup_from: Optional[Union[LookupLocation, LookupLocation]] = None, strategy: Optional[RecommendStrategy] = None, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, timeout: Optional[int] = None, **kwargs: Any) List[ScoredPoint][source]
recommend_batch(collection_name: str, requests: Sequence[Union[RecommendRequest, RecommendPoints]], consistency: Optional[Union[int[int], ReadConsistencyType]] = None, timeout: Optional[int] = None, **kwargs: Any) List[List[ScoredPoint]][source]
recommend_groups(collection_name: str, group_by: str, positive: Optional[Sequence[Union[int, str, PointId, List[float]]]] = None, negative: Optional[Sequence[Union[int, str, PointId, List[float]]]] = None, query_filter: Optional[Filter] = None, search_params: Optional[SearchParams] = None, limit: int = 10, group_size: int = 1, score_threshold: Optional[float] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude] = True, with_vectors: Union[bool, Sequence[str]] = False, using: Optional[str] = None, lookup_from: Optional[LookupLocation] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, strategy: Optional[RecommendStrategy] = None, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, timeout: Optional[int] = None, **kwargs: Any) GroupsResult[source]
recover_shard_snapshot(collection_name: str, shard_id: int, location: str, priority: Optional[SnapshotPriority] = None, wait: bool = True, **kwargs: Any) Optional[bool][source]
recover_snapshot(collection_name: str, location: str, priority: Optional[SnapshotPriority] = None, wait: bool = True, **kwargs: Any) Optional[bool][source]
recreate_collection(collection_name: str, vectors_config: Union[VectorParams, Mapping[str, VectorParams]], shard_number: Optional[int] = None, replication_factor: Optional[int] = None, write_consistency_factor: Optional[int] = None, on_disk_payload: Optional[bool] = None, hnsw_config: Optional[Union[HnswConfigDiff, HnswConfigDiff]] = None, optimizers_config: Optional[Union[OptimizersConfigDiff, OptimizersConfigDiff]] = None, wal_config: Optional[Union[WalConfigDiff, WalConfigDiff]] = None, quantization_config: Optional[Union[ScalarQuantization, ProductQuantization, BinaryQuantization, QuantizationConfig]] = None, init_from: Optional[Union[InitFrom, str]] = None, timeout: Optional[int] = None, sparse_vectors_config: Optional[Mapping[str, SparseVectorParams]] = None, sharding_method: Optional[ShardingMethod] = None, **kwargs: Any) bool[source]
retrieve(collection_name: str, ids: Sequence[Union[int, str, PointId]], with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) List[Record][source]
scroll(collection_name: str, scroll_filter: Optional[Union[Filter, Filter]] = None, limit: int = 10, order_by: Optional[Union[str[str], OrderBy, OrderBy]] = None, offset: Optional[Union[int, str, PointId]] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) Tuple[List[Record], Optional[Union[int, str, PointId]]][source]
search(collection_name: str, query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Sequence[float], Tuple[str, List[float]], NamedVector, NamedSparseVector], query_filter: Optional[Union[Filter, Filter]] = None, search_params: Optional[Union[SearchParams, SearchParams]] = None, limit: int = 10, offset: Optional[int] = None, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude, WithPayloadSelector] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None, append_payload: bool = True, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, timeout: Optional[int] = None, **kwargs: Any) List[ScoredPoint][source]
search_batch(collection_name: str, requests: Sequence[Union[SearchRequest, SearchPoints]], consistency: Optional[Union[int[int], ReadConsistencyType]] = None, timeout: Optional[int] = None, **kwargs: Any) List[List[ScoredPoint]][source]
search_groups(collection_name: str, query_vector: Union[ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Sequence[float], Tuple[str, List[float]], NamedVector, NamedSparseVector], group_by: str, query_filter: Optional[Filter] = None, search_params: Optional[SearchParams] = None, limit: int = 10, group_size: int = 1, with_payload: Union[bool, Sequence[str], PayloadSelectorInclude, PayloadSelectorExclude] = True, with_vectors: Union[bool, Sequence[str]] = False, score_threshold: Optional[float] = None, with_lookup: Optional[Union[str[str], WithLookup]] = None, consistency: Optional[Union[int[int], ReadConsistencyType]] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, timeout: Optional[int] = None, **kwargs: Any) GroupsResult[source]
set_payload(collection_name: str, payload: Dict[str, Any], points: Union[List[Union[int, str, PointId]], Filter, Filter, PointIdsList, FilterSelector, PointsSelector], key: Optional[str] = None, wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
unlock_storage(**kwargs: Any) LocksOption[source]
update_collection(collection_name: str, optimizers_config: Optional[Union[OptimizersConfigDiff, OptimizersConfigDiff]] = None, collection_params: Optional[Union[CollectionParamsDiff, CollectionParamsDiff]] = None, vectors_config: Optional[Union[Dict[str, VectorParamsDiff], VectorsConfigDiff]] = None, hnsw_config: Optional[Union[HnswConfigDiff, HnswConfigDiff]] = None, quantization_config: Optional[Union[ScalarQuantization, ProductQuantization, BinaryQuantization, Disabled, QuantizationConfigDiff]] = None, timeout: Optional[int] = None, sparse_vectors_config: Optional[Mapping[str, SparseVectorParams]] = None, **kwargs: Any) bool[source]
update_collection_aliases(change_aliases_operations: Sequence[Union[CreateAliasOperation, RenameAliasOperation, DeleteAliasOperation, AliasOperations]], timeout: Optional[int] = None, **kwargs: Any) bool[source]
update_vectors(collection_name: str, points: Sequence[PointVectors], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
upload_collection(collection_name: str, vectors: Union[Dict[str, ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]]], ndarray[Any, dtype[Union[bool_, int8, int16, int32, int64, uint8, uint16, uint32, uint64, float16, float32, float64, float128]]], Iterable[Union[List[float[float]], Dict[str[str], Union[List[float[float]], SparseVector]]]]], payload: Optional[Iterable[Dict[Any, Any]]] = None, ids: Optional[Iterable[Union[int, str, PointId]]] = None, batch_size: int = 64, parallel: int = 1, method: Optional[str] = None, max_retries: int = 3, wait: bool = False, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) None[source]
upload_points(collection_name: str, points: Iterable[PointStruct], batch_size: int = 64, parallel: int = 1, method: Optional[str] = None, max_retries: int = 3, wait: bool = False, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) None[source]
upload_records(collection_name: str, records: Iterable[Record], batch_size: int = 64, parallel: int = 1, method: Optional[str] = None, max_retries: int = 3, wait: bool = False, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) None[source]
upsert(collection_name: str, points: Union[Batch, List[Union[PointStruct, PointStruct]]], wait: bool = True, ordering: Optional[WriteOrdering] = None, shard_key_selector: Optional[Union[str[str], int[int], List[Union[str[str], int[int]]]]] = None, **kwargs: Any) UpdateResult[source]
property async_grpc_collections: qdrant_client.grpc.collections_service_pb2_grpc.CollectionsStub

gRPC client for collections methods

Returns

An instance of raw gRPC client, generated from Protobuf

property async_grpc_points: qdrant_client.grpc.points_service_pb2_grpc.PointsStub

gRPC client for points methods

Returns

An instance of raw gRPC client, generated from Protobuf

property async_grpc_snapshots: qdrant_client.grpc.snapshots_service_pb2_grpc.SnapshotsStub

gRPC client for snapshots methods

Returns

An instance of raw gRPC client, generated from Protobuf

property closed: bool
property grpc_collections: qdrant_client.grpc.collections_service_pb2_grpc.CollectionsStub

gRPC client for collections methods

Returns

An instance of raw gRPC client, generated from Protobuf

property grpc_points: qdrant_client.grpc.points_service_pb2_grpc.PointsStub

gRPC client for points methods

Returns

An instance of raw gRPC client, generated from Protobuf

property grpc_snapshots: qdrant_client.grpc.snapshots_service_pb2_grpc.SnapshotsStub

gRPC client for snapshots methods

Returns

An instance of raw gRPC client, generated from Protobuf

property http: SyncApis[ApiClient]

REST Client

Returns

An instance of raw REST API client, generated from OpenAPI schema

property rest: SyncApis[ApiClient]

REST Client

Returns

An instance of raw REST API client, generated from OpenAPI schema

Qdrant

Learn more about Qdrant vector search project and ecosystem

Discover Qdrant

Similarity Learning

Explore practical problem solving with Similarity Learning

Learn Similarity Learning

Community

Find people dealing with similar problems and get answers to your questions

Join Community