Disvortilo is a simple tool that breaks Esperanto words into roots and affixes.
You can install Disvortilo from PyPI using pip:
pip install disvortilofrom disvortilo import Disvortilo
disvortilo = Disvortilo()
print(disvortilo.parse("malliberejo"))
# > [('mal', 'liber', 'ej', 'o')]
# some have more than one possible output
# like "Esperanto" which means "a hoping person"
print(disvortilo.parse("esperantistino"))
# > [('esper', 'ant', 'ist', 'in', 'o'), ('esperant', 'ist', 'in', 'o')]
# you can also get the morphemes of the word
print(disvortilo.parse_detailed("plibonigojn"))
# > [(('pli', FULL_WORD), ('bon', ROOT), ('ig', SUFFIX), ('ojn', POS))]