During my past development projects, I built a lot of HTTP APIs using various langages (TypeScript, JavaScript, Python) and frameworks (fastify, FastAPI, flask, express). One thing I've noticed is that each of those frameworks have their own way of shaping HTTP error responses. This is actually not a big deal considering that most clients (i.e: HTTP clients) do not really rely on strict structure for such errors.
read moreOther articles
Testing Python code integration with an Azure Eventhub
On one of my project I needed to create a simple API allowing clients to publish some messages into an Azure EventHub. Because authentication is ensured by a JWT we could not rely on our clients to directly publish messages to the Eventhub (and by the way I prefer abstracting this away through a HTTP API).
read moreDebugger doesn't stop at breakpoints with pytest if pytest-cov is used
Recently, while trying to debug some of my
read morepytest
tests using VSCode, I discovered that my breakpoints were completely ignored and the tests never stopped. After nearly breaking my keyboard in frustration, I stumbled upon this GitHub issue.Don't use Python's property (for bad reasons)
I recently stumbled upon a code from one of my coworker who is rather new to Python. He is coming from a Java/Scala background and used python's
read moreproperty
decorator to mimic Java Getters/Setters. Let's see why you should not do this.