Python for the Lab started as a set of notes to accompany the courses. It quickly became an independent project which turned into a book, which you can find here. The book covers from setting up a development environment, including the use of virtual environments, to developing a driver to communicate with a custom-built device, to abstracting parts of the codes into classes and methods, and concludes with building a User Interface to perform experiments.
The book is not meant to be a book about how to program in Python, but a collection of best-practices that can get you started when developing solutions to interface with devices in the real world. Generally speaking, this realm is called instrumentation, and there are not a lot of resources on how to use Python for it. Over time, I've accumulated enough experience as to determine what is the best approach to avoid common pitfalls and how to be as efficient as possible when planning solutions.