aws-sso-lib allows you to programmatically interact with AWS IAM
Identity Center (formerly AWS SSO).

The primary functions that will be of interest are available at the
package level:

* get_boto3_session: Get a boto3 session for a specific account and
  role.
* login: ensure the user is logged in to Identity Center, with dispatch
  to the browser.
* list_available_accounts and list_available_roles: discover the access
  the user has.
* list_assignments: for admin purposes, iterate over all assignments in
  Identity Center, which is currently hard to do through the API.

Homepage:
https://github.com/benkehoe/aws-sso-util/blob/master/lib/README.md
