Code for the Common Python Package to include logging, environment checking, and database connections and query