Skip to content

Commit

Permalink
V0.8.5 0.8.7 (#54)
Browse files Browse the repository at this point in the history
* upd to support v0.8.5 of Qdrant

* add generated files
  • Loading branch information
generall authored Jul 26, 2022
1 parent 84d1114 commit 52bca99
Show file tree
Hide file tree
Showing 12 changed files with 1,102 additions and 82 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "qdrant_client"
version = "0.8.6"
version = "0.8.7"
description = "Client library for the Qdrant vector search engine"
authors = ["Andrey Vasnetsov <[email protected]>"]
packages = [
Expand Down
60 changes: 60 additions & 0 deletions qdrant_client/grpc/__init__.py

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions qdrant_client/grpc/snapshots_service.proto
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,28 @@ import "google/protobuf/timestamp.proto";

service Snapshots {
/*
Create snapshot
Create collection snapshot
*/
rpc Create (CreateSnapshotRequest) returns (CreateSnapshotResponse) {}
/*
List snapshots
List collection snapshots
*/
rpc List (ListSnapshotsRequest) returns (ListSnapshotsResponse) {}
/*
Create full storage snapshot
*/
rpc CreateFull (CreateFullSnapshotRequest) returns (CreateSnapshotResponse) {}
/*
List full storage snapshots
*/
rpc ListFull (ListFullSnapshotsRequest) returns (ListSnapshotsResponse) {}

}

message CreateFullSnapshotRequest {}

message ListFullSnapshotsRequest {}

message CreateSnapshotRequest {
string collection_name = 1; // Name of the collection
}
Expand Down
46 changes: 43 additions & 3 deletions qdrant_client/http/api/cluster_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,27 +160,67 @@ def _build_for_cluster_status(
Get information about the current state and composition of the cluster
"""
return self.api_client.request(
type_=m.InlineResponse200,
type_=m.InlineResponse2001,
method="GET",
url="/cluster",
)

def _build_for_collection_cluster_info(
self,
collection_name: str,
):
"""
Get cluster information for a collection
"""
path_params = {
"collection_name": str(collection_name),
}

return self.api_client.request(
type_=m.InlineResponse2006,
method="GET",
url="/collections/{collection_name}/cluster",
path_params=path_params,
)


class AsyncClusterApi(_ClusterApi):
async def cluster_status(
self,
) -> m.InlineResponse200:
) -> m.InlineResponse2001:
"""
Get information about the current state and composition of the cluster
"""
return await self._build_for_cluster_status()

async def collection_cluster_info(
self,
collection_name: str,
) -> m.InlineResponse2006:
"""
Get cluster information for a collection
"""
return await self._build_for_collection_cluster_info(
collection_name=collection_name,
)


class SyncClusterApi(_ClusterApi):
def cluster_status(
self,
) -> m.InlineResponse200:
) -> m.InlineResponse2001:
"""
Get information about the current state and composition of the cluster
"""
return self._build_for_cluster_status()

def collection_cluster_info(
self,
collection_name: str,
) -> m.InlineResponse2006:
"""
Get cluster information for a collection
"""
return self._build_for_collection_cluster_info(
collection_name=collection_name,
)
Loading

0 comments on commit 52bca99

Please sign in to comment.