MCPcopy Create free account
hub / github.com/cosdata/cosdata / get_collection

Function get_collection

tests/test-grpc.py:89–96  ·  view source on GitHub ↗

Gets a specific collection using the gRPC server.

(stub, collection_id)

Source from the content-addressed store, hash-verified

87
88
89def get_collection(stub, collection_id):
90 """Gets a specific collection using the gRPC server."""
91 try:
92 request = vector_service.GetCollectionRequest(id=collection_id)
93 return stub.GetCollection(request)
94 except grpc.RpcError as e:
95 print(f"Error getting collection: {e.details()}")
96 raise
97
98
99def delete_collection(stub, collection_id):

Calls

no outgoing calls

Tested by

no test coverage detected