Monthly Archives: March 2020

Fixing Virtualenvs after System Python Upgrade

Recently I’ve been testing out the 20.04 beta for Ubuntu. It’s real nice. But it recently upgraded python from python3.7 to python3.8 underneath me. It’s honestly not such a bad thing. Python 3.8 has a lot of improvements that will make working with the language quite excellent. I’m particularly looking forward to utilizing Assignment Expressions… Read More »

A Python Logging Pattern

When writing command line utilities in python for almost any purpose. I almost always want to control the level of verbosity in my project. To that end, I’ve regularly found myself utilizing a combination of argparse and logging to create a command line flag to let me control verbosity at runtime. I thought it might… Read More »

Reading Google Sheets With Python

Reading Google Sheets With Python Google Sheets is an excellent spreadsheet tool. Sometimes good tools end up used more than they truly aught to be used. With that in mind it becomes useful at some point to stop dealing with spreadsheets directly and utilize databases or other dedicated applications to “do the work”. However, during… Read More »

Jinja Hydration in Python

Jinja is an excellent tool and it’s incredibly great at allowing you to make rich and featureful configuration files. Essentially, you can make your configs dynamic. For example if you had an yaml file that looks like this : {% if plat == "aws" %} metadata_endpoint: http://169.254.169.254/latest/meta-data/ {% endif plat == "digitalocean" %} metadata_endpoint: http://169.254.169.254/metadata/v1/… Read More »