There are many resources for SAML 2.0 on the Internet. Here’s a few pointers:
SAML 2.0 on Wikipedia
The pysaml2 documentation
samltest.id identity provider for testing
SSOCircle identity provider for testing
auth0 as identity provider for testing
“I need a SAML IdP to test - now!” on medium.com
SAML2 Service Provider with Single Logout Capability
Example SAML SP service with Flask and pysaml2