Stefan Scherfke

Attrs, Dataclasses and Pydantic

Attrs, data classes and pydantic seem very similar on a first glance, but they are very different when you take a closer look. In this article, I’ll find out, what these libraries have in common, how they differ and which one I’m going to use in the future.

The macOS Dark Mode, your Terminal and Vim

MacOS’ new Dark Mode is quite nice, but as a developer, you might also want to switch your Terminal profile and Vim theme – all at the same time, of course …

How to mask an image with a smooth circle in PyQt5

Masking a QPixmap with a smooth circle is not as easily done as one might wish. I’ll show you how to do it with the help of a QImage, a QPainter and a QBrush. I also take care of Retina displays.

Assertions and Exceptions

This article explains the difference between assertions and exceptions and when to use which one.

Advanced asyncio testing

I demonstrate how you can use pytest’s fixture system and the plug-in pytest-asyncio to reduce the boilerplate code required for testing networking libraries.

page 1 of 10

older articles »