MCPcopy Create free account
hub / github.com/alibaba/proxima / BaseClient

Class BaseClient

sdk/python/pyproximabe/core/client.py:31–244  ·  view source on GitHub ↗

BaseClient.

Source from the content-addressed store, hash-verified

29
30
31class BaseClient(abc.ABC):
32 """
33 BaseClient.
34 """
35 @abc.abstractmethod
36 def __init__(self, handler):
37 self._handler = handler
38 self._check_version()
39
40 def create_collection(self, collection_config):
41 """
42 Create collection.
43
44 Args:
45 collection_config (CollectionConfig): collection config.
46
47 Returns:
48 ProximaBeStatus: status
49 """
50 return self._handler.create_collection(collection_config.to_pb())
51
52 def describe_collection(self, collection_name):
53 """
54 Describe collection.
55
56 Args:
57 collection_name (str): collection name
58
59 Returns:
60 tuple: 2-element tuple containing
61 * :class:`ProximaBeStatus`: status
62 * :class:`CollectionInfo`: collection information
63 """
64 return self._handler.describe_collection(collection_name)
65
66 def drop_collection(self, collection_name):
67 """
68 Drop collection.
69
70 Args:
71 collection_name (str): collection name
72
73 Returns:
74 ProximaBeStatus: status
75 """
76 return self._handler.drop_collection(collection_name)
77
78 def stats_collection(self, collection_name):
79 """
80 Stats collection.
81
82 Args:
83 collection_name (str): collection name
84
85 Returns:
86 tuple: 2-element tuple containing
87 * :class:`ProximaBeStatus`: status
88 * :class:`CollectionStats`: collection statistics

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected