Heads Up :
The post you are writing will appear in a public forum. Please ensure all content is appropriate for public consumption. Review the employee guidelines for the community here.
I spent about a week trying to figure out how to get a Python web app to use the Duo Access Gateway (DAG) to perform user authentication using SAML. To save someone else this pain I have created an example on GitHub.