MCPcopy Create free account
hub / github.com/DeepL/deepl-python / TextResult

Class TextResult

deepl/api_data.py:12–28  ·  view source on GitHub ↗

Holds the result of a text translation request.

Source from the content-addressed store, hash-verified

10
11
12class TextResult:
13 """Holds the result of a text translation request."""
14
15 def __init__(
16 self,
17 text: str,
18 detected_source_lang: str,
19 billed_characters: int,
20 model_type_used: Optional[str] = None,
21 ):
22 self.text = text
23 self.detected_source_lang = detected_source_lang
24 self.billed_characters = billed_characters
25 self.model_type_used = model_type_used
26
27 def __str__(self):
28 return self.text
29
30
31class WriteResult:

Callers 1

translate_textMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected