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.