Decoding Email Header and Contents

Using email.parser and email.policy along with policy.default means that you do not need to worry about character encoding as the modules will take care of it automatically.

I forget where I saw it but I believe that policy.default will become the real default in the future.
Current policy.compat32 is the module default.

Custom Corporate Holidays with holidays package

I am currently working on a newish personal project. My plan is to create a Python version of a Google Script app that I am running. I wanted to find a way to determine if a given date is a national holiday. This requires taking into account that National Holidays that fall on a Sunday are moved to the following Monday or to Tuesday if Monday is already a National Holiday. I also needed to support adding Company holidays. This is important as it impacts some calculations. Enter the Python package: holidays

[Read More]