Skip to main content

fetch-deepl

pytestpythonCode style: blackLicense: MITPyPI version

Fetch translation text from a deepl-fastapi API.

Install it

pip install fetch-deepl

# pip install git+https://github.com/ffreemt/fetch-deepl
# poetry add git+https://github.com/ffreemt/fetch-deepl
# git clone https://github.com/ffreemt/fetch-deepl && cd fetch-deepl

Use it

from fetch_deepl import fetch_deepl

print(fetch_deepl("Tell me and I forget. Teach me and I remember. Involve me and I learn."))
# 告诉我,我就忘了。教导我,我就记住。让我参与,我就学

print(fetch_deepl("书山有路勤为径"))
# There is a path to the mountain of books and diligence is the path

print(fetch_deepl("There is a path to the mountain of books and diligence is the path", from_lang="en", to_lang="de"))
# Es gibt einen Weg zum Berg der Bücher und Fleiß ist der Weg

print(fetch_deepl("书山有路勤为径", from_lang="zh", to_lang="de"))
# Es gibt einen Weg durch die Berge des Lernens und des Fleißes

Supported languages can be obtained from deepl's homepage, as of today:

from pprint import pprint
from fetch_deepl import lang_dict
pprint(lang_dict)
{'bg': 'Bulgarian',
 'cs': 'Czech',
 'da': 'Danish',
 'de': 'German',
 'el': 'Greek',
 'en': 'English',
 'es': 'Spanish',
 'et': 'Estonian',
 'fi': 'Finnish',
 'fr': 'French',
 'hu': 'Hungarian',
 'id': 'Indonesian',
 'it': 'Italian',
 'ja': 'Japanese',
 'lt': 'Lithuanian',
 'lv': 'Latvian',
 'pl': 'Polish',
 'pt': 'Portuguese',
 'ro': 'Romanian',
 'ru': 'Russian',
 'sk': 'Slovak',
 'sl': 'Slovenian',
 'sv': 'Swedish',
 'tr': 'Turkish',
 'zh': 'Chinese (simpl.)'}

Download files

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

Source Distribution

fetch-deepl-0.1.2.tar.gz (5.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fetch_deepl-0.1.2-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file fetch-deepl-0.1.2.tar.gz.

File metadata

  • Download URL: fetch-deepl-0.1.2.tar.gz
  • Upload date:
  • Size: 5.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10

File hashes

Hashes for fetch-deepl-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2911946d4f7bc304eef5df602c9bb535b62858fc5e712ef5b709779f19dce6e4
MD5 e04a1faf30fc5734cac20c8f4bc161e3
BLAKE2b-256 fadea7f8497bb6f5c8489c7c9a5d540e61e908f830db05aba2fe6cc3fc99910a

See more details on using hashes here.

File details

Details for the file fetch_deepl-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: fetch_deepl-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Windows/10

File hashes

Hashes for fetch_deepl-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 c77aa4e26d0972ab8ecf63e5d6393d5e518d30f935dd892e64f006f1de5985f3
MD5 f3c2f66e2b7159cc5c08a964a235469e
BLAKE2b-256 d525c04b4f38a2538e587b04b177b3b2e99d27db6d52465093ebbc946881d248

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 files

0.1.1

2 files

0.1.0

2 files

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page