|
Every Friday, you'll get a recap of the most important and exciting Python and coding news. The Friday Loop also keeps everyone posted on new ArjanCodes courses and any limited offers coming up.
Hey everyone, I love it when I come up with a design that uses exactly the things I thought were a sign of bad design. In this week's video I show you how to build a clean Python SDK for a REST API. The idea was simple: create a reusable base model that handles all the CRUD operations so you can just write User.find() and user.save(), without duplicating logic all over your codebase. Sounds great, right? Well, after recording the video, I realized something: not all APIs will have all CRUD...
Hey everyone, Python’s flexibility is great, but if you're working on a larger project it becomes hard to make sure not everything depends on everything else. There is a way to avoid that trap, and that's by using abstractions. Unfortunately, I often see production code with way too much coupling that can be easily improved by relying on abstractions. This week’s video shows simple abstractions using Callable, ABC, and Protocol. You’ll learn how to: Reduce unnecessary imports Decouple your...
Hey everyone, I was reviewing some of the projects I’ve worked on over the past year, and I noticed something interesting: I almost never use Python’s @dataclass anymore. Not because it’s bad. In fact, dataclasses are still a great feature of the language. But as my projects have grown more complex, especially with tools like FastAPI, Pydantic, and SQLAlchemy, I’ve found that dataclasses just… don’t fit the way I design software anymore. In my latest video, I dive into this in detail. You’ll...