2👍
✅
First thing : What you have tried ?
Before asking your question you should tell community what you tried and you caught up with some issues.
However you are new here I would like to answer it for you.
There are many SAML2 packages are available on pypi please go through it.
One of them is Here
You have to get the xml from your IDP (Identity provider) and you have to ask your IDP to configure your metadata in IDP system.
The above library will help you to generate your metadata.Please follow the steps given in documentation
Try and then if you get some issue do let us know.
Source:stackexchange.com