An asynchronous wrapper for freeDictionaryAPI.
IMPORTANT: This is not my API. This is merely a wrapper. Any issues with the API should be reported at the API's repository.
First install the package using either:
pip install asyncdictionary
python -m pip install asyncdictionary
import asyncdictionary
# create an instance of `Client`
dictionary = asyncdictionary.Client()
If you have a ClientSession, you may pass that in as a kwarg instead.
This is essentially all the information that a raw request to the API will return to you. Gives everything that the http API will give you including the definitions and phonetics.
- word (str) - The word you want the information of.
This returns the definitions and the part of speech of that definition. Does NOT give the phonetics or the word itself.
- word (str) - The word you want the meaning of.
List[Meaning]
This returns the phonetics of the word. Does not give anything else.
- word(str) - The word you want the phonetics of
List[Phonetic]
An alias to Client.get_phonetics See that for more information.
Closes the Client.
Explains what exactly the methods return
NOTE: Some of the attributes might return
None
if nothing was given by the API.
The object returned from Client.get_word
method.
The word inputted
A list of Phonetic objects the word has.
The object returned from Client.get_phonetics
and Word.phonetics
The text representation of the pronunciation of the word.
A link to the audio speech of the word.
The object returned from Client.get_meanings
and Word.meanings
The part of speech for a certain definition.
A list of Definition objects. The API returns multiple definitions of a word, hence the list of Definition
objects
The object returned from Meaning.definitions
A definition of the word.
An example of how the word is used.
A list of words that are synonyms to the word or None
if there were none given.