A python library that generates random facts
Randfacts
Randfacts is a python library that generates random facts. You can use randfacts.get_fact()
to return a random fun fact. Disclaimer: Facts are not guaranteed to be true.
randfacts can either be installed via pip or via the AUR, whichever way you prefer.
Installation via pip:
$ pip3 install randfacts
Installation via AUR:
$ git clone https://aur.archlinux.org/python-randfacts.git && cd python-randfacts
$ makepkg -si
import randfacts
x = randfacts.get_fact()
print(x)
will print a random fact like:Penguins can't taste sweet or savory flavors, only sour and salty ones
This package has a filter option to filter out potentially inappropriate facts. The filter is on by default. To disable the filter, you can just set the filter_enabled
parameter to False
.