Follow the documentations to learn more about Service Connector.
It also includes a script that uses the mysql-connector-python library (not part of the Azure SDK) to connect to and query the database. You can adapt this example to create an Azure Database for ...