Skip to main content

Free DeepL translation with Glossaries

Project description

DeepL Ex: Unlimited Free DeepL Translation

:warning: This project is currently under the development.

This project is inspired by Vincent Young's DeepLX.

But the project does not support Glossaries, thus I made this with DeepL's new internal APIs.

Prerequisites

pip install aiohttp brotli

Usage

import asyncio
import deeplex


async def main():
    texts = await deeplex.translate(
        'Hello World, John!', 'EN', 'DE',
        glossaries={'John': 'Python'},
    )

    # ['Hallo Welt, Python!', 'Hallo Python, Welt!', 'Hallo, Python!', 'Hallo Python!']
    print(texts)


if __name__ == '__main__':
    event_loop = asyncio.get_event_loop()
    event_loop.run_until_complete(main())
    event_loop.close()

License

Licensed under the MIT license.

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

deeplex-0.0.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

deeplex-0.0.1-py3-none-any.whl (4.4 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