Skip to main content

An API wrapper for the PONS dictionary

Project description

pons.py

An API wrapper for the PONS dictionary written in Python

Installation

$ pip install pons.py

Usage

from pons import Client

pons = Client("YOUR_SECRET")  # see PONS API reference

# get dictionaries
# params: language (de|el|en|es|fr|it|pl|pt|ru|sl|tr|zh)
dictionaries = pons.get_dictionaries("en")        # returns a list of Dictionary objects

# get translations
# required params: term, dictionary, source language
# optional params: output language, fuzzy (bool), references (bool)
entries = pons.query("term", "deen", "en")["en"]  # returns a list of EntryHit objects
entries[0].translations                           # returns a list of translations (strings)

References

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pons.py-1.1.1.tar.gz (4.2 kB view hashes)

Uploaded Source

Built Distribution

pons.py-1.1.1-py3-none-any.whl (4.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page