LibIndic's fortune module is a fortune cookie generator that returns random quotes from certain sources. The current list of sources are:
- Quotes from Chanakya
- Quotes from Thirukkural
- Malayalam Proverbs
- Clone the repository
git clone https://github.com/libindic/indicfortune.git
- Change to the cloned directory
cd indicfortune
- Run setup.py to create installable source
python setup.py sdist
- Install using pip
pip install dist/fortune*.tar.gz
>>> from libindic.fortune import Fortune
>>> instance = Fortune()
>>> print(instance.fortune("chanakya"))
The earth is supported by the power of truth; it is the
power of truth that makes the sunshine and the winds blow;
indeed all things rest upon truth.
>>> print(instance.fortune("chanakya", "daughter"))
Residing in a small village devoid of proper living
facilities, serving a person born of a low family,
unwholesome food, a frowning wife, a foolish son, and a
widowed daughter burn the body without fire.
For more details read the docs