Skip to main content

GitHub Actions status | sdras/awesome-actions codecov PyPI

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

Metadata

Release files for ponstrans 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for ponstrans 1.1.1
File Interpreter ABI Platform
ponstrans-1.1.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Release files / ponstrans-1.1.1-py2.py3-none-any.whl

Download URL ponstrans-1.1.1-py2.py3-none-any.whl
Size 5.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
4a3f95e2674ed8f993936de1ba03d8701000f63984cd449e69eaf0369123a36f
BLAKE2b-256 checksum
How to use checksums
4d3dcf773bc9a5708818c5930b6e00307967827a3e7a9a0f620ce9aff1630d5d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

1.1.1 This release

1 release file

1.1.0

1 release file

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page