I followed along with Joel Grus 1 hour live-coding video, where he builds a deep learning library from scratch. Joel is a software engineer for the AllenNLP library.
The code uses type hints using the 'Typing' library, which allows static type checking using mypy.
I followed along to learn more from the video, and to pick up on good patterns. The code is posted here as a reference for future use of these patterns.
http://joelgrus.com/2017/12/04/livecoding-madness-building-a-deep-learning-library/