Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dorukyum/pons.py
An API wrapper for the PONS dictionary written in Python
https://github.com/dorukyum/pons.py
Last synced: 22 days ago
JSON representation
An API wrapper for the PONS dictionary written in Python
- Host: GitHub
- URL: https://github.com/dorukyum/pons.py
- Owner: Dorukyum
- License: mit
- Created: 2022-05-05T17:17:24.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-18T09:45:15.000Z (4 months ago)
- Last Synced: 2024-09-18T19:28:53.401Z (about 2 months ago)
- Language: Python
- Size: 9.77 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
pons.py
An API wrapper for the PONS dictionary written in Python## Installation
```sh
$ pip install pons.py
```## Usage
```py
from pons import Clientpons = 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
- [PONS API Reference](https://en.pons.com/p/online-dictionary/developers/api)
- [API Documentation](https://en.pons.com/p/files/uploads/pons/api/api-documentation.pdf)