Related, but shameless plug, my PyCon 2017 talk "How to make a good library API" is also about the "API as UI" concept: https://www.youtube.com/watch?v=4mkFfce46zE
There's also a Django-specific version called "Your Django app is a User Interface": https://www.youtube.com/watch?v=Mnzvjn1v1CY