Python adventures: Finding unused dependencies

Introduction This article is about an issue I got a couple of times when working on medium to largish Python projects and having to deploy them. It happens quite often that the dependencies are messy and whoever is, or was working on the project happened to install a bunch of libraries because they needed to add a new feature now. But when deployment comes, we want the environments or containers to be lean for multiple reasons, build time and pipelines latency being some of them....

Managing and grouping files with Python

Introduction We are sometimes faced with systems which generate lots of files that we have to deal with, be it for triage or later reading; it could be logs, data dumps, automatically generated reports and so on. In many cases, we don’t have a say in the how and why of the files' organization and might want to deal with them automatically, later on. Which is what I’d like to tackle here, using Python standard library....

June 6, 2022 9 min

Python getters and setters

If you have ever worked with a language such as Java, the concept of getter or setter won’t be foreign to you. If you haven’t, getters and setters are methods which let you access and modify class attributes; usually where you wouldn’t have access otherwise because of the restricting scope. It may then come as a surprise that Python, where all members are public, also has a concept of getters, setters and deleters....

February 21, 2022 7 min