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.0.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for fetch_deepl-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 09a95c9c8c1e5298ac7d862791ebea440faf5690308cc2183adab9e9b24cd6a1 |
|
MD5 | 35af3befb6d850cde145f6a36e515b8b |
|
BLAKE2b-256 | c4b93b08838fc3d216f80cd746bdb1bfffac6f7f2f1b01745d81f8c5cf4c9238 |