Fetch result from a deepl-fastapi API.
Project description
fetch-deepl
fetch-deepl descr
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
N.B. If you switch to a new pair of languages, the first translation may not be correct. This has to do with how deepl-fastapi
(which this whole things is based on) functions.
Project details
Release history Release notifications | RSS feed
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.0a0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for fetch_deepl-0.1.0a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a5bc2ee7c32717cc8b7325a1a6f4575bd04b0e066009f9d17e6bd64b6c019ddf |
|
MD5 | 064939fd5a1cb2e36e1f5ea31faa7661 |
|
BLAKE2b-256 | 5dc46de89372e4118a6b5f1c87248d10316f3493df2b7b95a8c3c48197fc140c |