fetch-deepl-0.1.2
توضیحات
Fetch result from a deepl-fastapi API.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | - |
| نام فایل | fetch-deepl-0.1.2 |
| نام | fetch-deepl |
| نسخه کتابخانه | 0.1.2 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | ffreemt |
| ایمیل نویسنده | - |
| آدرس صفحه اصلی | https://github.com/ffreemt/fetch-deepl |
| آدرس اینترنتی | https://pypi.org/project/fetch-deepl/ |
| مجوز | MIT |
# fetch-deepl
[](https://github.com/ffreemt/fetch-deepl/actions)[](https://www.python.org/downloads/)[](https://github.com/psf/black)[](https://opensource.org/licenses/MIT)[](https://badge.fury.io/py/fetch_deepl)
Fetch translation text from a deepl-fastapi API.
## Install it
```shell
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
```python
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:
```python
from pprint import pprint
from fetch_deepl import lang_dict
pprint(lang_dict)
```
```shell
{'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.)'}
```
نیازمندی
| مقدار | نام |
|---|---|
| >=1.7.0,<2.0.0 | logzero |
| >=0.4.1,<0.5.0 | typer |
| >=0.23.0,<0.24.0 | httpx |
زبان مورد نیاز
| مقدار | نام |
|---|---|
| >=3.8.3,<4.0.0 | Python |
نحوه نصب
نصب پکیج whl fetch-deepl-0.1.2:
pip install fetch-deepl-0.1.2.whl
نصب پکیج tar.gz fetch-deepl-0.1.2:
pip install fetch-deepl-0.1.2.tar.gz