It’s a truism of sorts that in order to improve your skills, you have to practice them. For coding, the stereotypical image is of someone typing, actually creating new things. But as often as not, you’re going to be reading code instead. This code might be something you write yesterday or last year, or it might be something that someone else wrote.
One way or another, reading code is a great way to get increasing familiarity with stylistic, syntactic patterns and to get exposed to some best practices, especially if you get to pick the code you’re reading.
I’ll be doing the same as I ramp up my Python proficiency. I wanted to gather some lists of codebases and assorted resources in one place for myself, and I hope maybe it’ll be useful for someone else as well.
Good Quality Python Code
jinja
— a templating engine written in Python (and see the recommendations for supplemental reading and watching forjinja
here)howdoi
— a search tool for coding answers via the command lineflask
— a micro-web framework for PythonFastAPI
— another web framework that’s a bit larger than flaskdiamond
— a Python daemon that collects and publishes system metricswerkzeug
— a web server gateway libraryrequests
— an HTTP library, now part of the Python standard librarytablib
— library for Pythonic way to work with tabular datasetsclick
— a Python package for creating command line interfacespathlib
— part of the Python standard library; a module to handle filesystem paths (also the corresponding PEP proposal #428)dataclasses
— a module in the Python standard library; reduces boilerplate of writing classes (also the corresponding PEP proposal #557)joblib
— a library to support lightweight pipelining in Python
Other Resources
- 500 Lines or Less — a book in which specific small open-source projects are profiled to understand how they approached their particular challenge.
- The Architecture of Open Source Applications: Elegance, Evolution and a Few Fearless Hacks — examination of the structure of the software of some open-source software applications.
- The Architecture of Open Source Applications: Volume II: Structure, Scale and a Few More Fearless Hacks — the second volume in the series.