Even if you want to expand your functions to Python, IMHO subprocess library would be most simple way to use your bash commands to execute router cli commands:
(called the script reboot.py, but didn’t want to reboot my router constantly to test, so changed it to get eventlog
)