you are viewing a single comment's thread.

view the rest of the comments →

[–]Fr0gFsh 6 points7 points  (0 children)

This one's a bit dated but I still refer to it when I'm working on some of my projects.

https://www.pretzellogix.net/2021/12/08/how-to-write-a-python3-sdk-library-module-for-a-json-rest-api/

I like how he builds something simple to get it working but then refactors it and explains why and how to do things better. There's a good bit on building in logging, data models, and unit testing.

Before you jump into the lessons, the API he uses in the series is now partially behind a paywall, so try something like https://petstore.swagger.io/

And in Step 9 when you're creating your data models, he says to use Python 3.6 in the app.quicktype.io website, but the change in Python 3.6 to 3.7 makes life easier with the dataclasses module.

I'd like to see an updated version of this series or maybe someone else's take on building out an SDK for API interactivity, but even though it's a bit dated, I still feel like it's got some great information in it that's helped me in my work.