How to go about creating users programmatically in Superset with a defined role?

Say I have an email sign in page. User signs up. After sign up I would like to programmatically create the user with the gamma role into a Superset instance.