MCPcopy Index your code
hub / github.com/DeepL/deepl-python / from_json

Method from_json

deepl/api_data.py:625–635  ·  view source on GitHub ↗

Create GlossaryInfo from the given API JSON object.

(json)

Source from the content-addressed store, hash-verified

623
624 @staticmethod
625 def from_json(json) -> "GlossaryInfo":
626 """Create GlossaryInfo from the given API JSON object."""
627 return GlossaryInfo(
628 json["glossary_id"],
629 json["name"],
630 bool(json["ready"]),
631 str(json["source_lang"]).upper(),
632 str(json["target_lang"]).upper(),
633 parse_timestamp(json["creation_time"]),
634 int(json["entry_count"]),
635 )
636
637 @property
638 def glossary_id(self) -> str:

Callers 15

_create_glossaryMethod · 0.45
get_glossaryMethod · 0.45
list_glossariesMethod · 0.45
from_jsonMethod · 0.45
from_jsonMethod · 0.45
from_jsonMethod · 0.45

Calls 2

parse_timestampFunction · 0.90
GlossaryInfoClass · 0.85

Tested by

no test coverage detected