Interface-mock-live (IML) pattern for connecting with third-party services in Python applications

To KISS or not to KISS
I remember how, several years ago at Doist, we talked about integrating with external services, like email providers or analytics tools. The question was whether to use a simple function or an abstraction layer.
We ended up having two groups.
• KISSers. The first one advocated for following theKISS principle and calling the service API directly. Something as simple as storing an API token in your settings, then calling requests.get() on an endpoint. Wrap this in a function and you’re done.
评论
?
参与讨论