Python library for the DeepL language translation API.

Overview

DeepL Python Library

PyPI version Supported Python versions License: MIT

The DeepL API is a language translation API that allows other computer programs to send texts and documents to DeepL's servers and receive high-quality translations. This opens a whole universe of opportunities for developers: any translation product you can imagine can now be built on top of DeepL's best-in-class translation technology.

The DeepL Python library offers a convenient way for applications written in Python to interact with the DeepL API. We intend to support all API functions with the library, though support for new features may be added to the library after they’re added to the API.

Getting an authentication key

To use the DeepL Python Library, you'll need an API authentication key. To get a key, please create an account here. You can translate up to 500,000 characters/month for free.

Installation

The library can be installed from PyPI using pip:

pip install --upgrade deepl

If you need to modify this source code, install the dependencies using poetry:

poetry install

Requirements

The library is tested with Python versions 3.6 to 3.9.

The requests module is used to perform HTTP requests; the minimum is version 2.18.

Usage

import deepl

# Create a Translator object providing your DeepL API authentication key
translator = deepl.Translator("YOUR_AUTH_KEY")

# Translate text into a target language, in this case, French
result = translator.translate_text("Hello, world!", target_lang="FR")
print(result)  # "Bonjour, le monde !"
# Note: printing or converting the result to a string uses the output text

# Translate multiple texts into British English
result = translator.translate_text(["お元気ですか?", "¿Cómo estás?"], target_lang="EN-GB")
print(result[0].text)  # "How are you?"
print(result[0].detected_source_lang)  # "JA"
print(result[1].text)  # "How are you?"
print(result[1].detected_source_lang)  # "ES"

# Translating documents
translator.translate_document_from_filepath(
    "Instruction Manual.docx",
    "Bedienungsanleitlung.docx",
    target_lang="DE",
    formality="more"
)

# Check account usage
usage = translator.get_usage()
if usage.character.limit_exceeded:
    print("Character limit exceeded.")

# Source and target languages
for language in translator.get_source_languages():
    print(f"{language.code} ({language.name})")  # Example: "DE (German)"

num_languages = sum([language.supports_formality
                     for language in translator.get_target_languages()])
print(f"{num_languages} target languages support formality parameter")

Logging

Logging can be enabled to see the HTTP-requests sent and responses received by the library. Enable and control logging using Python's logging module, for example:

import logging
logging.basicConfig()
logging.getLogger('deepl').setLevel(logging.DEBUG)

Exceptions

All module functions may raise deepl.DeepLException or one of its subclasses. If invalid arguments are provided, they may raise the standard exceptions ValueError and TypeError.

Command Line Interface

The library can be run on the command line supporting all API functions. Use the --help option for usage information:

python3 -m deepl --help

The CLI requires your DeepL authentication key specified either as the DEEPL_AUTH_KEY environment variable, or using the --auth-key option, for example:

python3 -m deepl --auth-key=YOUR_AUTH_KEY usage

Note that the --auth-key argument must appear before the command argument. The recognized commands are:

Command Description
text translate text(s)
document translate document(s)
usage print usage information for the current billing period
languages print available languages

For example, to translate text:

python3 -m deepl --auth-key=YOUR_AUTH_KEY text --to=DE "Text to be translated."

Wrap text arguments in quotes to prevent the shell from splitting sentences into words.

Development

The test suite depends on deepl-mock. Run it in another terminal while executing the tests, using port 3000. Set the mock-server listening port using the environment variable DEEPL_MOCK_SERVER_PORT.

Execute the tests using tox.

Issues

If you experience problems using the library, or would like to request a new feature, please create an issue.

Comments
  • Add filename param to Translator#translate_document() method

    Add filename param to Translator#translate_document() method

    Thanks for making this great SDK!

    When using Translator#translate_document() method with BinaryIO input_document argument, the internal translate_document_upload call fails due to the following exception:

      File "/path-to-ptyhon/lib/python3.9/site-packages/deepl/translator.py", line 827, in translate_document
        handle = self.translate_document_upload(
      File "/path-to-ptyhon/lib/python3.9/site-packages/deepl/translator.py", line 892, in translate_document_upload
        raise ValueError(
    ValueError: filename is required if uploading file content as string or bytes
    

    This pull request resolves this issue by adding a new filename argument to translate_document() method.

    opened by seratch 8
  • DocumentTranslationException

    DocumentTranslationException

    Hi there, I've been using the Deepl python package to translate the entire PDFs. I had it running for some time already and most of the time it worked perfectly. Today, I was going through the logs and found some failed cases and the error logs I've collected. I couldn't figure out what went wrong so please provide some suggestions on how to address them:

    #1:
    Traceback (most recent call last):
      File "/opt/document_translator.py", line 528, in translate_batch_docs
        target_lang=self.target_language_code)
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 780, in translate_document_from_filepath
        raise e
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 775, in translate_document_from_filepath
        glossary=glossary,
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 839, in translate_document
        "Error occurred while translating document", handle
    deepl.exceptions.DocumentTranslationException: <super: <class 'DocumentTranslationException'>, <DocumentTranslationException object>>, document request: Document ID: B54E4E5999C915EF63AACA877843C03C, key: 2B17****
    !
    
    #2:
    Traceback (most recent call last):
      File "/opt/document_translator.py", line 528, in translate_batch_docs
        target_lang=self.target_language_code)
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 780, in translate_document_from_filepath
        raise e
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 775, in translate_document_from_filepath
        glossary=glossary,
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 817, in translate_document
        glossary=glossary,
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 876, in translate_document_upload
        self._raise_for_status(status, content, json)
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 522, in _raise_for_status
        "Too many requests, DeepL servers are currently experiencing "
    deepl.exceptions.TooManyRequestsException: Too many requests, DeepL servers are currently experiencing high load, message: Too many non-downloaded documents!
    
    #3:
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 445, in _make_request
        six.raise_from(e, None)
      File "<string>", line 3, in raise_from
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 440, in _make_request
        httplib_response = conn.getresponse()
      File "/opt/conda/lib/python3.6/http/client.py", line 1379, in getresponse
        response.begin()
      File "/opt/conda/lib/python3.6/http/client.py", line 311, in begin
        version, status, reason = self._read_status()
      File "/opt/conda/lib/python3.6/http/client.py", line 272, in _read_status
        line = str(self.fp.readline(_MAXLINE + 1), "iso-8859-1")
      File "/opt/conda/lib/python3.6/socket.py", line 586, in readinto
        return self._sock.recv_into(b)
      File "/opt/conda/lib/python3.6/ssl.py", line 1012, in recv_into
        return self.read(nbytes, buffer)
      File "/opt/conda/lib/python3.6/ssl.py", line 874, in read
        return self._sslobj.read(len, buffer)
      File "/opt/conda/lib/python3.6/ssl.py", line 631, in read
        v = self._sslobj.read(len, buffer)
    socket.timeout: The read operation timed out
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/requests/adapters.py", line 449, in send
        timeout=timeout
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 756, in urlopen
        method, url, error=e, _pool=self, _stacktrace=sys.exc_info()[2]
      File "/opt/conda/lib/python3.6/site-packages/urllib3/util/retry.py", line 532, in increment
        raise six.reraise(type(error), error, _stacktrace)
      File "/opt/conda/lib/python3.6/site-packages/urllib3/packages/six.py", line 735, in reraise
        raise value
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 706, in urlopen
        chunked=chunked,
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 447, in _make_request
        self._raise_timeout(err=e, url=url, timeout_value=read_timeout)
      File "/opt/conda/lib/python3.6/site-packages/urllib3/connectionpool.py", line 337, in _raise_timeout
        self, url, "Read timed out. (read timeout=%s)" % timeout_value
    urllib3.exceptions.ReadTimeoutError: HTTPSConnectionPool(host='api.deepl.com', port=443): Read timed out. (read timeout=10.886348485946655)
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/deepl/http_client.py", line 168, in _internal_request
        request, stream=stream, timeout=timeout, **kwargs
      File "/opt/conda/lib/python3.6/site-packages/requests/sessions.py", line 655, in send
        r = adapter.send(request, **kwargs)
      File "/opt/conda/lib/python3.6/site-packages/requests/adapters.py", line 529, in send
        raise ReadTimeout(e, request=request)
    requests.exceptions.ReadTimeout: HTTPSConnectionPool(host='api.deepl.com', port=443): Read timed out. (read timeout=10.886348485946655)
    
    The above exception was the direct cause of the following exception:
    
    Traceback (most recent call last):
      File "/opt/document_translator.py", line 528, in translate_batch_docs
        target_lang=self.target_language_code)
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 780, in translate_document_from_filepath
        raise e
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 775, in translate_document_from_filepath
        glossary=glossary,
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 817, in translate_document
        glossary=glossary,
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 874, in translate_document_upload
        "v2/document", data=request_data, files=files
      File "/opt/conda/lib/python3.6/site-packages/deepl/translator.py", line 476, in _api_call
        **kwargs,
      File "/opt/conda/lib/python3.6/site-packages/deepl/http_client.py", line 119, in request_with_backoff
        raise exception
      File "/opt/conda/lib/python3.6/site-packages/deepl/http_client.py", line 106, in request_with_backoff
        request, stream=stream, timeout=backoff.get_timeout()
      File "/opt/conda/lib/python3.6/site-packages/deepl/http_client.py", line 184, in _internal_request
        raise ConnectionException(message, should_retry=True) from e
    deepl.exceptions.ConnectionException: Request timed out: HTTPSConnectionPool(host='api.deepl.com', port=443): Read timed out. (read timeout=10.886348485946655)
    !
    

    I'm using deepl==1.3.1 and the code I use was:

    class DocumentTranslator(object):
        def __init__(self):
            self.translator = deepl.Translator(auth_key=AUTO_TRANSLATION_KEY)
            self.target_language_code = "en-us"
    
        def translate_batch_docs(pdfs):
            for pdf in pdfs:
                translated_pdf = pdf.replace('.pdf', '_translated.pdf')
                self.translator.translate_document_from_filepath(pdf, translated_pdf, target_lang=self.target_language_code)
    
    opened by ay2456 7
  • Inappropriate Exception for queries to Ukranian

    Inappropriate Exception for queries to Ukranian

    Instead of appropriately raising DeepLException: Bad request, message: Value for 'target_lang' not supported., the request throws TooManyRequestsException: Too many requests, DeepL servers are currently experiencing high load, message: Too many requests after ~10s of sleeping. It would be much better to raise early that it is not currently supported.

    In [21]: translator.translate_text("hrdinum slava", source_lang='cs', target_lang="uk")        
    2022-08-30 12:32:47,545 deepl        INFO     Request to DeepL API method=POST url=https://api-free.deepl.com/v2/translate
    2022-08-30 12:32:47,828 deepl        INFO     Starting retry 1 for request POST https://api-free.deepl.com/v2/translate after sleeping for 0.72 seconds. 
    2022-08-30 12:32:48,711 deepl        INFO     Starting retry 2 for request POST https://api-free.deepl.com/v2/translate after sleeping for 1.39 seconds. 
    2022-08-30 12:32:50,287 deepl        INFO     Starting retry 3 for request POST https://api-free.deepl.com/v2/translate after sleeping for 2.57 seconds. 
    2022-08-30 12:32:52,963 deepl        INFO     Starting retry 4 for request POST https://api-free.deepl.com/v2/translate after sleeping for 4.27 seconds. 
    2022-08-30 12:32:57,410 deepl        INFO     Starting retry 5 for request POST https://api-free.deepl.com/v2/translate after sleeping for 4.98 seconds. 
    2022-08-30 12:33:02,605 deepl        INFO     DeepL API response status_code=429 url=https://api-free.deepl.com/v2/translate
    ---------------------------------------------------------------------------
    TooManyRequestsException                  Traceback (most recent call last)
    Input In [21], in <module>
    ----> 1 translator.translate_text("hrdinum slava", source_lang='cs', target_lang="uk")
    
    File ~/Git/Supernova/venv/lib/python3.9/site-packages/deepl/translator.py:769, in Translator.translate_text(self, text, source_lang, target_lang, split_sentences, preserve_formatting, formality, glossary, tag_handling, outline_detection, non_splitting_tags, splitting_tags, ignore_tags)
        763     request_data["ignore_tags"] = join_tags(ignore_tags)
        765 status, content, json = self._api_call(
        766     "v2/translate", data=request_data
        767 )
    --> 769 self._raise_for_status(status, content, json)
        771 translations = json.get("translations", [])
        772 output = []
    
    File ~/Git/Supernova/venv/lib/python3.9/site-packages/deepl/translator.py:560, in Translator._raise_for_status(self, status_code, content, json, glossary, downloading_document)
        558     raise DeepLException(f"Bad request{message}")
        559 elif status_code == http.HTTPStatus.TOO_MANY_REQUESTS:
    --> 560     raise TooManyRequestsException(
        561         "Too many requests, DeepL servers are currently experiencing "
        562         f"high load{message}"
        563     )
        564 elif status_code == http.HTTPStatus.SERVICE_UNAVAILABLE:
        565     if downloading_document:
    
    TooManyRequestsException: Too many requests, DeepL servers are currently experiencing high load, message: Too many requests
    
    opened by jvacek 6
  • translating xml - spaces deleted at end of text string before <b> bold

    translating xml - spaces deleted at end of text string before bold

    Hello, I am using this API to translate XML documents from Schema. Some of my text elements have bold sections and I use lxml.etree to parse and translate text and tail elements. The bold elements within text end up with the space removed in front of them. Anything I can do to keep the spaces?

    opened by vf211 6
  • Any way to get native language names from the list?

    Any way to get native language names from the list?

    For instance, in the README it shows this snippet:

    for language in translator.get_source_languages():
        print(f"{language.code} ({language.name})")  # Example: "DE (German)"
    

    It would be wonderful if the "native" translation of their language could be shown, too.

    In other words, "DE (German)" would also print "Deutsch". Most of the languages I can figure out, but not really sure what the "ZH" equivalent would be.

    I'm using the free api level, so I'm hoping that could be added to that level.

    opened by mkinney 6
  • Wrong endpoint. Use https://api.deepl.com For Deepl PRO auth key

    Wrong endpoint. Use https://api.deepl.com For Deepl PRO auth key

    Hi, When I try to use api-free key to translate text it works fine, but when I try to use Pro-key I get following error:

    translator.translate_text('abc', target_lang='en-us').text

    Traceback (most recent call last):
      File "<input>", line 1, in <module>
      File "/home/.../venv3/lib/python3.6/site-packages/deepl/translator.py", line 685, in translate_text
        self._raise_for_status(status, content, json)
      File "/home/.../venv3/lib/python3.6/site-packages/deepl/translator.py", line 501, in _raise_for_status
        f"Authorization failure, check auth_key{message}"
    deepl.exceptions.AuthorizationException: Authorization failure, check auth_key, message: Wrong endpoint. Use https://api.deepl.com
    

    Translator calls v2 API and fails with this error. But when I tried to change api_call url from v2 to v1 it worked. Is there any way to use my key with API v2 or change v2 call to v1 except for changing package source code? I'm using python3.6.14 and requests==2.25.1

    opened by ibelous 6
  • Is there anyway to check which line caused error when translating document?

    Is there anyway to check which line caused error when translating document?

    I have this error which I suspect is due to the format of a few lines in my text file. But this error is very cryptic so there is no way for me to check what caused it.

    Traceback (most recent call last): File ".\testDeepL.py", line 7, in translator.translate_document_from_filepath( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\deepl\translator.py", line 774, in translate_document_from_filepath raise e File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\deepl\translator.py", line 764, in translate_document_from_filepath self.translate_document( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\deepl\translator.py", line 803, in translate_document handle = self.translate_document_upload( File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\deepl\translator.py", line 858, in translate_document_upload
    self._raise_for_status(status, content, json) File "C:\Users\Admin\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.8_qbz5n2kfra8p0\LocalCache\local-packages\Python38\site-packages\deepl\translator.py", line 479, in _raise_for_status raise DeepLException(f"Bad request{message}")

    opened by leminhyen2 6
  • Issue with ignore_tags parameter

    Issue with ignore_tags parameter

    Hello! Running the deepl package with anvil.works (https://pypi.org/project/deepl/1.5.0/) Example code: translation_output = translator.translate_text(translation_input target_lang="EN-US", ignore_tags=x) Getting: NameError: name 'x' is not defined

    opened by roland71 5
  • translate_text_with_glossary issue

    translate_text_with_glossary issue

    Hello,

    I'm getting this issue when I try to call with a glossary:

    flask_app | File "/usr/local/lib/python3.8/site-packages/deepl/translator.py", line 745, in translate_text_with_glossary flask_app | source_lang=glossary.source_lang, flask_app | AttributeError: 'numpy.ndarray' object has no attribute 'source_lang'

    Here is my calling code: translation = client.translate_text_with_glossary(df['SourceTokenized'].tolist(), target_lang=targetLangDeeplCode, tag_handling='html', ignore_tags='ignore', split_sentences="0", preserve_formatting="1", formality=formality, glossary=glossaryId)

    In your example you are not providing any of the optional parameters. However, I need to have these in my case.

    If it can help. The same request without the glossary is working perfectly fine: translation = client.translate_text(df['SourceTokenized'].tolist(), target_lang=targetLangDeeplCode, tag_handling='html', ignore_tags='ignore', split_sentences="0", preserve_formatting="1", formality=formality)

    Thanks for the help!

    Best regards, Samuel

    opened by SamueLacombe 5
  • Can't create an account for free-api

    Can't create an account for free-api

    Hello DeepL team, thanks for a great product!

    I want to use your API to create an iOS shortcut, but I can't find how to create an account to use free API on the page from your documentation - https://www.deepl.com/pro/select-country?cta=menu-login-signup/#developer

    I don't see my country in the list, so I can't create an account. Can you help me with that?

    opened by AntonUspehov 5
  • get_usage() does not give exact character count

    get_usage() does not give exact character count

    Hi,

    If I call translator.get_usage() before and after a translation, I get the same number of character used, an even 1 000 000. Is there a way to get the exact character count?

    opened by jaixan 4
  • Dropped words and sentences in the translation

    Dropped words and sentences in the translation

    DeepL API will sometimes drop phrases, sentences, or words in the post translation. I am assuming this issue is already known, but am adding another data point. Feel free to close this issue if it's not needed.

    Attached in the top part of the screenshot is the API leaving off "In the early nineteenth century" in the post translation. Interestingly introducing a typo seemed to "fix" the issue, in the bottom portion of the screenshot (numerous -> numberous).

    image

    the prompt: Here on the ancient road connecting Babylon to Ecbatana, Darius the Great had a bas-relief carved on a rock face to commemorate his victory over the pseudo-Smerdis who wished to seize the Persian throne. Information about the divi-sion of the Empire into satrapies is also included in the long text of inscriptions, which are written in three languages: Akkadian, Old Persian and Elamite. In the early nineteenth century, the labours of the British Sir Henry Rawlinson resulted in the decipherment of the text, making it possible to read the numerous inscribed clay tablets that were later discovered in Nineveh.

    bug 
    opened by ELanning 3
  • [Feature Request?] Ability to set a preferred gender for outputs with gendered languages

    [Feature Request?] Ability to set a preferred gender for outputs with gendered languages

    Apologies if this issue is irrelevant.

    Is there a way to specify a preferred gender for gendered languages such as French or Spanish in a way that the translation that comes up matches it?

    For instance, with preferred gender set to feminine, from english to french: Input: "I've come to this city" Output: "Je suis venue dans cette ville" (instead of "Je suis venu dans cette ville")

    Otherwise it would be very nice if this was added. In fact, this is kind of a feature request for DeepL as a whole, not just the API, but I didn't know where else to ask. I guess this would take a certain time to implement, too.

    api change 
    opened by qexat 2
  • Get detected source language from translate_document_from_filepath

    Get detected source language from translate_document_from_filepath

    I need to get the detected source language after sending a whole PDF for translation using translate_document_from_filepath. However, I quickly went through the documentation and source code and didn't find any way to do this. Is it possible?

    api change 
    opened by ay2456 1
Releases(v1.11.0)
  • v1.11.0(Sep 26, 2022)

    Added

    • Add formality options 'prefer_less' and 'prefer_more'.

    Changed

    • Requests resulting in 503 Service Unavailable errors are now retried. Attempting to download a document before translation is completed will now wait and retry (up to 5 times by default), rather than raising an exception.
    Source code(tar.gz)
    Source code(zip)
  • v1.10.0(Sep 9, 2022)

    Added

    • New language available: Ukrainian ('uk'). Add language code constant and tests.

      Note: older library versions also support new languages, this update only adds new code constant.

    Changed

    • Add note and workaround to README about Poetry error on Ubuntu 22.04.
    Source code(tar.gz)
    Source code(zip)
  • v1.9.0(Jul 7, 2022)

  • v1.8.0(Jun 10, 2022)

    Added

    • Optional filename parameter added to Translator.translate_document(), only required if uploading string or bytes containing file content.

    Changed

    • Update contributing guidelines, we can now accept Pull Requests.

    Fixed

    • Fix GitLab CI config.
    Source code(tar.gz)
    Source code(zip)
  • v1.7.0(May 18, 2022)

    Added

    • New languages available: Indonesian ('id') and Turkish ('tr'). Add language code constants and tests.

      Note: older library versions also support the new languages, this update only adds new code constants.

    • Add limit_reached and any_limit_reached properties to Usage object returned by get_usage().

    • Add Translator.translate_document_wait_until_done() to poll translation status until translation is complete or fails.

    • Add auth_key_is_free_account() utility function.

    Changed

    • Improve readme usage examples.

    Deprecated

    • Deprecate limit_exceeded and any_limit_exceeded properties of Usage object returned by get_usage(), use limit_reached and any_limit_reached instead.
    Source code(tar.gz)
    Source code(zip)
  • v1.6.0(Apr 12, 2022)

    Added

    • Add error_message property to DocumentStatus, describing the error in case of document translation failure.

    Changed

    • Improve error message if translate_text_with_glossary is called without an instance of GlossaryInfo.
    • translate_document and translate_document_from_filepath return final DocumentStatus, allowing the number of billed characters to be queried.
    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Apr 11, 2022)

  • v1.5.0(Feb 28, 2022)

    Added

    • Add support for HTML tag handling in translate_text().

    Deprecated

    • DocumentTranslationException.document_request is deprecated, use document_handle instead.
    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Feb 4, 2022)

  • v1.4.0(Jan 19, 2022)

    Added

    • Add contribution guidelines -- currently we are unable to accept Pull Requests.
    • Add --glossary-id argument for CLI document command.

    Changed

    • Improve README.
    • Raise DocumentNotReadyException when attempting to download a document before it has been translated. Previously the base class DeepLException was thrown.

    Fixed

    • Add optional filename argument to translate_document_upload() to fix uploading file content as string or bytes.
    Source code(tar.gz)
    Source code(zip)
  • v1.3.1(Nov 16, 2021)

  • v1.3.0(Nov 15, 2021)

    Added

    • Add glossary support for document translation.
    • Add proxy support.

    Fixed

    • Fix issues with parallelized tests by changing how test glossaries are created and deleted.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.1(Oct 19, 2021)

    Added

    • Add support for Python 3.10.

    Fixed

    • Fix bug that caused User-Agent header to be omitted from HTTP requests.
    • Fix glossary name prefix used in unit-tests to match git repository name.
    • Add workaround for possible issue in datetime.strptime in Python 3.6.
    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Oct 7, 2021)

    Added

    • Add Translator.get_glossary_languages() to query language pairs supported for glossaries.
    • Add constants for all supported languages codes, for example: Language.GERMAN.

    Changed

    • Internal language caching and client-side checking of language codes are removed.

    Deprecated

    • Some optional arguments related to language caching are now deprecated, and will be removed in a future version:
      • Translator(): the skip_language_check argument
      • Translator.get_source_languages() and Translator.get_target_languages(): the skip_cache argument

    Fixed

    • Fix HTTP request retries for document uploads.
    Source code(tar.gz)
    Source code(zip)
  • v1.1.3(Sep 27, 2021)

Owner
DeepL
DeepL
Go online translation package

Translate Go online translation package Install go get github.com/nuveo/translate Available Translator API's Microsoft or send us the next Translator

nuveo 33 Nov 27, 2022
A simple self-hostable Machine Translation service, powered by spaGO

A simple self-hostable Machine Translation service, powered by spaGO

null 105 Nov 9, 2022
API health-check dashboad (go/python)

simple-golang-docker apitest/apiendpoints.csv 内に書かれたAPIエンドポイント(URI)に対して、GETリクエストを送信し、レスポンスのヘッダからステータスコードのみを抽出する。 Sample Input apitest/apiendpoints.csv

null 0 Jan 16, 2022
It's so many regular expression forms are difficult to understand, such as perl, python, grep awk

Introduction Jamie Zawinski: Some people, when confronted with a problem, think "I know, I'll use regular expressions." Now they have two problems. It

aceking 0 Mar 31, 2022
Simple-Weather-API - Simple weather api app created using golang and Open Weather API key

Simple Weather API Simple weather api app created using golang and Open Weather

Siva Prakash 3 Feb 6, 2022
Simple Shopify API for the Go Programming Language

go-shopify Simple API made with go to make CRUD request to your Shopify Store. Installation go get github.com/rapito/go-shopify How-to-use Get Reques

Robert Peralta 24 Sep 27, 2022
Go library for accessing the MyAnimeList API: http://myanimelist.net/modules.php?go=api

go-myanimelist go-myanimelist is a Go client library for accessing the MyAnimeList API. Project Status The MyAnimeList API has been stable for years a

Stratos Neiros 33 Sep 28, 2022
go-whatsapp-rest-API is a Go library for the WhatsApp web which use Swagger as api interface

go-whatsapp-rest-API go-whatsapp-rest-API is a Go library for the WhatsApp web which use Swagger as api interface Multi-devices (MD) Support. This ver

null 17 Nov 30, 2022
Go client for the YNAB API. Unofficial. It covers 100% of the resources made available by the YNAB API.

YNAB API Go Library This is an UNOFFICIAL Go client for the YNAB API. It covers 100% of the resources made available by the YNAB API. Installation go

Bruno Souza 55 Oct 6, 2022
An API client for the Notion API implemented in Golang

An API client for the Notion API implemented in Golang

Anatoly Nosov 347 Nov 27, 2022
lambda-go-api-proxy makes it easy to port APIs written with Go frameworks such as Gin to AWS Lambda and Amazon API Gateway.

aws-lambda-go-api-proxy makes it easy to run Golang APIs written with frameworks such as Gin with AWS Lambda and Amazon API Gateway.

Amazon Web Services - Labs 743 Dec 6, 2022
A API scanner written in GOLANG to scan files recursively and look for API keys and IDs.

GO FIND APIS _____ ____ ______ _____ _ _ _____ _____ _____ _____ / ____|/ __ \ | ____|_ _| \ | | __ \ /\ | __ \_

Sreekanth Sasi 3 Oct 25, 2021
The NVD API is an unofficial Go wrapper around the NVD API.

NVD API The NVD API is an unofficial Go wrapper around the NVD API. Supports: CVE CPE How to use The following shows how to basically use the wrapper

Lucas TESSON 5 Nov 2, 2022
A Wrapper Client for Google Spreadsheet API (Sheets API)

Senmai A Wrapper Client for Google Spreadsheet API (Sheets API) PREPARATION Service Account and Key File Create a service account on Google Cloud Plat

ytnobody / satoshi azuma 0 Nov 5, 2021
💾 Wolke API is the API behind Wolke image storage and processing aswell as user management

?? Wolke API Wolke API is the API behind Wolke image storage and processing aswell as user management Deploying To deploy Wolke Bot you'll need podman

wolke.casa 1 Dec 21, 2021
Upcoming mobiles api (UpMob API)

upcoming_mobiles_api (UpMob API) UpMob API scraps 91mobiles.com to get devices i

null 0 Dec 21, 2021
Arweave-api - Arweave API implementation in golang

Arweave API Go implementation of the Arweave API Todo A list of endpoints that a

Joshua Lawson 1 Jan 16, 2022
Api-product - A basic REST-ish API that allows you to perform CRUD operations for Products

Description A basic REST-ish API that allows you to perform CRUD operations for

Abdul Salim 0 Jan 3, 2022
Contact-api - API for websites I have designed that have to send unauthenticated email

contact https://aws.amazon.com/premiumsupport/knowledge-center/custom-headers-ap

Noah Varghese 0 Apr 11, 2022