Skip to content

An API wrapper for the PONS dictionary written in Python

License

Notifications You must be signed in to change notification settings

Dorukyum/pons.py

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

An API wrapper for the PONS dictionary written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages