The sample provides code sample on how to use connection pooling with Python Azure function.
- Create MySQL database in Azure (This sample uses flexible server)
- Add your client IP address in the networking section (if you are testing it from VS Code.)
- Download SSL Certificate and replace with DigiCertGlobalRootCA.crt.pem VS code and local testing. (In Networking section in Azure Portal- https://learn.microsoft.com/en-us/azure/mysql/flexible-server/how-to-connect-tls-ssl)
- Allow public access from any Azure service within Azure to this server (in networking section of MySQL - same link as above)
- Setup VS code with python.
- git clone https://github.com/Azure-Samples/function-mysql-connection-pool-python
- cd function-mysql-connection-pool-python
- Change the Azure MySQL server connection details in the init.py
- Run the sample.
- Using KeyVault with Azure Functions to store secrets. https://github.com/Azure-Samples/serverless-keyvault-secret-rotation-handling
- VS Code with python https://code.visualstudio.com/docs/languages/python