Easy settings management for Python functions with Pydantic

File this under quick tips and tricks for Python functions in OpenFaas. I just learned about Pydantic’s support for reading settings from secret files and it fits perfectly with secrets in OpenFaaS. If you love Python or you are writing Python functions in OpenFaas, this is a great way to simplify your configuration parsing. I am going to keep this short and sweet. Let’s say you have an OpenFaas function that needs to access a database.

Using Tox and PyTest with OpenFaaS

I think it is an uncontroversial statement to say testing is important in software development. Writing tests may not always be fun, but nothing is a sweet as that moment when a unit test catches a bug before you deploy. In OpenFaaS we have tons of tests in each project, even the certifier itself runs a short suite of end-to-end tests. But, not all of our function templates have first class testing support.

SSL Expiry Quick and Simple

Ever have that feeling you are forgetting something right as you leave work? You are probably thinking about your keys or your lunch box but I am talking about your SSL certificate. They don’t last forever, we know this when we setup SSL but that doesn’t stop it from sneaking up on us. It has happened to the big guys like Instagram and Google, at Teem recently, and of course for myself with my own home server.