Wed 25 Aug 2021

Why I use attrs instead of pydantic

This post is an account of why I prefer using the attrs library over Pydantic. I'm writing it since I am often asked this question and I want to have something concrete to link to. This is not meant to be an objective comparison of attrs and Pydantic; I'm not interested in comparing bullet points of features, nor can I be unbiased since I'm a major contributor to attrs (at time of writing, second by commit count, after Hynek) and the author of one of its unofficial companion libraries, cattrs.

Source: Why I use attrs instead of pydantic.

Creating PDF Invoices in Python with borb

In this guide, we'll be using borb - a Python library dedicated to reading, manipulating and generating PDF documents. It offers both a low-level model (allowing you access to the exact coordinates and layout if you choose to use those) and a high-level model (where you can delegate the precise calculations of margins, positions, etc to a layout manager).

We'll take a look at how to create a PDF invoice in Python using borb.

Source: Creating PDF Invoices in Python with borb, an article by Joris Schellekens.