An example for python logging using StdLib.
To use the yaml configuration file you will need to install pyyaml.
pip install pyyaml
To use the SMTP handler you need an SMTP server. You can run up a test stmp server on your local machine by running:
python3 -m smtpd -n -c DebuggingServer 127.0.0.1:60025