Skip to main content

Async API for DeepL Translator

Project description

Asynchronous API for DeepL Translator

It also shipped with a simple command line interface.

Installation

pip install -U aiodeepl

API Usage

Documentation is yet complete. Apart from the following example, you can also refer to the __main__.py file for more examples.

import aiodeepl

async def main():
    translator = aiohttp.Translator(api_key="123")
    result = await translator.translate("Hello, World!", target_lang="DE")
    print(result)

CLI Usage

aiodeepl --api-key 123 -t "Hello, World!" -d DE

You can save api_key in config file or input it interactively for security.

To translate a document, you can use the following command:

aiodeepl --api-key 123 -f README.pdf -d DE -o README_DE.pdf

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aiodeepl-0.1.5.tar.gz (9.7 kB view hashes)

Uploaded Source

Built Distribution

aiodeepl-0.1.5-py3-none-any.whl (9.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page