Skip to main content

A Python wrapper for the DeepL API

Project description

deepl.py

A Python wrapper for the DeepL API

GitHub license GitHub issues GitHub forks GitHub stars check PyPI version Python Versions Downloads

installing

Install and update using pip:

pip install deepl.py

A simple example.

# Sync Sample

import deepl

text = 'I have a pen.'

translator = deepl.Translator(deepl.RequestsAdapter('Your API key'))


def main():
    print(translator.translate(text, target_lang=deepl.TargetLang.Japanese))


if __name__ == '__main__':
    main()
#Async Sample

import asyncio

import deepl

text = 'I have a pen.'

translator = deepl.Translator(deepl.AiohttpAdapter('Your API key'))


async def main():
    print(await translator.translate(text, target_lang=deepl.TargetLang.Japanese))

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

Thank you to everyone who Helped me (#^^#)

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

deepl.py-1.0.3.tar.gz (6.4 kB view hashes)

Uploaded Source

Built Distribution

deepl.py-1.0.3-py3-none-any.whl (7.2 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