MCPcopy Create free account
hub / github.com/comaps/comaps / get_api_key

Function get_api_key

tools/python/translate.py:107–114  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105GOOGLE_TARGET_LANGUAGES.sort()
106
107def get_api_key():
108 key = os.environ.get('DEEPL_FREE_API_KEY')
109 if key == None:
110 key = os.environ.get('DEEPL_API_KEY')
111 if key == None:
112 print('Error: DEEPL_FREE_API_KEY or DEEPL_API_KEY env variables are not set')
113 exit(1)
114 return key
115
116def google_translate(text, source_language):
117 fromTo = source_language.lower() + ':'

Callers 1

deepl_translate_oneFunction · 0.85

Calls 1

getMethod · 0.65

Tested by

no test coverage detected