pip install sankhyaakaara
from sankhyaakaara import convert
num = 123456789
word = convert(num)
print(word)
You can also use the web app to convert numbers to words in Sanskrit. Sankhyaakaara Web App
Add "sankhyaa_bot" to your telegram friend list. Send any number and get sanskrit text. For e.g. type 234 and get back चतुस्त्रिंशदधिकद्विशतम्