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

Method get_multilingual_glossary

deepl/deepl_client.py:498–514  ·  view source on GitHub ↗

Retrieves MultilingualGlossaryInfo for the glossary with specified ID. :param glossary_id: ID of glossary to retrieve. :return: MultilingualGlossaryInfo with information about specified glossary. :raises GlossaryNotFoundException: If no glossary with give

(
        self, glossary_id: str
    )

Source from the content-addressed store, hash-verified

496 return MultilingualGlossaryDictionaryInfo.from_json(json)
497
498 def get_multilingual_glossary(
499 self, glossary_id: str
500 ) -> MultilingualGlossaryInfo:
501 """Retrieves MultilingualGlossaryInfo for the glossary with specified
502 ID.
503
504 :param glossary_id: ID of glossary to retrieve.
505 :return: MultilingualGlossaryInfo with information about specified
506 glossary.
507 :raises GlossaryNotFoundException: If no glossary with given ID is
508 found.
509 """
510 status, content, json = self._api_call(
511 f"v3/glossaries/{glossary_id}", method="GET"
512 )
513 self._raise_for_status(status, content, json, glossary=True)
514 return MultilingualGlossaryInfo.from_json(json)
515
516 def list_multilingual_glossaries(self) -> List[MultilingualGlossaryInfo]:
517 """Retrieves a list of MultilingualGlossaryInfo for all available

Callers 5

test_glossary_createFunction · 0.80
test_glossary_getFunction · 0.80
test_glossary_deleteFunction · 0.80

Calls 3

_api_callMethod · 0.80
_raise_for_statusMethod · 0.80
from_jsonMethod · 0.45

Tested by 5

test_glossary_createFunction · 0.64
test_glossary_getFunction · 0.64
test_glossary_deleteFunction · 0.64