Tips on Writing Flexible Libraries and CLIs in Python