The Design of Everyday APIs
- Liffey B
- 09:45 on 13 July 2022
- 30 minutes
What makes a good API for a library? Or more importantly, what makes it bad? This talk will discuss the principles of what goes into user-centered design, and how best to apply those principles when writing a Python library for fellow developers.
What makes a good API for a library? Or more importantly, what makes it bad?
Implementing an API is an art. It’s the connection between the user and the library itself. How can we optimize that connection to make the experience more pleasing? What makes a user reach for one library over another? What goes into an ergonomic API?
This talk will first discuss what makes an API good: documentation, simplicity, consistency, completeness, and flexibility. We will apply those elements by looking at examples in the wild of good and poorly designed APIs. And we’ll discuss what to leverage and how to avoid pitfalls of bad design within Python (when [not] to use metaclasses, subclassing versus composition, decorators, etc).