PyDictionary module in Python (original) (raw)
Last Updated : 20 Mar, 2026
PyDictionary is a Python module used to fetch word definitions, synonyms, antonyms and translations. It provides a simple interface to access these features from Python programs.
**Note: The original PyDictionary library is no longer actively maintained and may not work reliably with newer Python versions (especially Python 3.10 and above). An alternative called AyDictionary, which is more compatible with modern Python 3 versions, can be used instead.
Installation
You can install PyDictionary using pip:
pip install PyDictionary
Getting Started with PyDictionary
1. Import the Module
from PyDictionary import PyDictionary
2. Create an Instance
dictionary = PyDictionary()
3. Fetch the Meaning of a Word
Use the meaning() method to get the definition of a word:
Python `
Get the meaning of "python"
meaning = dictionary.meaning("python") print(meaning)
`
**Output:
{'Noun': ['large nonvenomous snake', 'a programming language']}
**4. Fetch Synonyms
You can get synonyms using the synonym() method:
Python `
synonyms = dictionary.synonym("happy") print(synonyms)
`
**Output:
['content', 'joyful', 'cheerful']
5. Fetch Antonyms
The antonym() method returns antonyms:
Python `
antonyms = dictionary.antonym("happy") print(antonyms)
`