Skip to content

Commit e4f3b2b

Browse files
committed
feat(client): integrate metrics module with client
- Import `Metrics` class in `client.py` - Add `metrics` attribute to `Client` class documentation - Initialize `metrics` instance in `Client` constructor - Update module documentation to reference metrics dependency
1 parent 3b8da2f commit e4f3b2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/typesense/client.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
- typesense.conversations_models: Provides the ConversationsModels class.
1818
- typesense.debug: Provides the Debug class.
1919
- typesense.keys: Provides the Keys class.
20+
- typesense.metrics: Provides the Metrics class.
2021
- typesense.multi_search: Provides the MultiSearch class.
2122
- typesense.operations: Provides the Operations class.
2223
- typesense.stopwords: Provides the Stopwords class.
@@ -43,6 +44,7 @@
4344
from typesense.conversations_models import ConversationsModels
4445
from typesense.debug import Debug
4546
from typesense.keys import Keys
47+
from typesense.metrics import Metrics
4648
from typesense.multi_search import MultiSearch
4749
from typesense.operations import Operations
4850
from typesense.stemming import Stemming
@@ -72,6 +74,7 @@ class Client:
7274
operations (Operations): Instance for various Typesense operations.
7375
debug (Debug): Instance for debug operations.
7476
stopwords (Stopwords): Instance for managing stopwords.
77+
metrics (Metrics): Instance for retrieving system and Typesense metrics.
7578
conversations_models (ConversationsModels): Instance for managing conversation models.
7679
"""
7780

@@ -102,6 +105,7 @@ def __init__(self, config_dict: ConfigDict) -> None:
102105
self.operations = Operations(self.api_call)
103106
self.debug = Debug(self.api_call)
104107
self.stopwords = Stopwords(self.api_call)
108+
self.metrics = Metrics(self.api_call)
105109
self.conversations_models = ConversationsModels(self.api_call)
106110

107111
def typed_collection(

0 commit comments

Comments
 (0)