Python library to convert pinyin with numbers to tone with marks. This library is based on https://github.com/chanind/pinyin-tone-converter
pip install pinyin-tone-converter
from pinyin_tone_converter.pinyin_tone_converter import PinyinToneConverter
PinyinToneConverter().convert_text("lu4")
"lù"
Examples can be seen in tests https://github.com/Lingyuai/pinyin-tone-converter/tree/main/tests