We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 80f9b78 commit 503bf28Copy full SHA for 503bf28
README.md
@@ -40,9 +40,12 @@ The `requests` module is used to perform HTTP requests; the minimum is version 2
40
41
```python
42
import deepl
43
+import os
44
-# Create a Translator object providing your DeepL API authentication key
45
-translator = deepl.Translator("YOUR_AUTH_KEY")
+# Create a Translator object providing your DeepL API authentication key.
46
+# To avoid writing your key in source code, you can set it in an environment
47
+# variable DEEPL_AUTH_KEY, then read the variable in your Python code:
48
+translator = deepl.Translator(os.getenv("DEEPL_AUTH_KEY"))
49
50
# Translate text into a target language, in this case, French
51
result = translator.translate_text("Hello, world!", target_lang="FR")
0 commit comments