Add a short description here!
Project description
ponstrans
Unofficial client for PONS online dictionary
Description
Translates words scraping https://en.pons.com/ in the background.
Supported languages:
"ar": "Arabic",
"bg": "Bulgarian",
"zh": "Chinese",
"nl": "Dutch",
"en": "English",
"fr": "French",
"de": "German",
"el": "Greek",
"it": "Italian",
"la": "Latin",
"pl": "Polish",
"pt": "Portuguese",
"ru": "Russian",
"sl": "Slovenian",
"es": "Spanish",
"tr": "Turkish",
"cs": "Czech",
"da": "Danish",
"hu": "Hungarian",
"no": "Norwegian",
"sv": "Swedish",
"lb": "Elvish"
Installation
pip install ponstrans
Usage
>>> from ponstrans import translate
>>> translations = translate(word="hallo", source_language="de", target_language="en")
>>> translations[:2]
[{'source': 'hallo', 'target': 'hello'}, {'source': 'hallo (zur Begrüßung)', 'target': 'hi'}]
Note
The performance is quite bad because it scrapes the whole html page in the background. Use the official (paid) API for better performance: https://en.pons.com/p/online-dictionary/developers/api
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 Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ponstrans-1.1.1-py2.py3-none-any.whl.
File metadata
- Download URL: ponstrans-1.1.1-py2.py3-none-any.whl
- Upload date:
- Size: 5.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.38.0 CPython/3.7.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a3f95e2674ed8f993936de1ba03d8701000f63984cd449e69eaf0369123a36f
|
|
| MD5 |
0e95448ab5ddaf6b2f68bc8563f3acf1
|
|
| BLAKE2b-256 |
4d3dcf773bc9a5708818c5930b6e00307967827a3e7a9a0f620ce9aff1630d5d
|