Skip to content

DeepL Ex: Unlimited Free DeepL Translation with Glossaries

License

Notifications You must be signed in to change notification settings

OrigamiDream/deeplex

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DeepL Ex: Unlimited Free DeepL Translation

⚠️ 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

pip install deeplex
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.