I'm usually using Makefile to do automation within my project.
Invoke is a simple tool to make command line mapping to python code.
You write python tasks/functions and the Invoke library maps to shell commands and arguments.
tasks.py file in the top directory where you run your project and your command with the library models very easily.
a good tutorial is on youtube https://www.youtube.com/watch?v=fqS2TBcxoeA