Good day Aswin ( @Aswin ),
Option 1: Direct work with Azure Python API
Azure have a full Azure libraries (SDK) for Python, which allow you to provisioning, managing, and using Azure resources from Python application code.
The following document is the Python developers entery point to the Azure world:
https://video2.skills-academy.com/en-us/azure/developer/python/
The following list the Azure libraries (SDK) for Python:
https://video2.skills-academy.com/en-us/azure/developer/python/azure-sdk-overview
And here you have a sample step-by-step to all that you asked and more
https://video2.skills-academy.com/en-us/samples/azure-samples/sql-database-python-manage/sql-database-python-manage/ including: Create a SQL Server instance, Create a Firewall rule, List servers by resource group, List servers by subscription, List server usages, Create a database, Get a database, List databases, List database usages, Delete a database, Delete a SQL Server instance.
Option 2: You can use simple Transact-SQL in order to create the database. This is done using simple CREATE DATABASE commant
Note: By the way, I am not working with python and I had no idea what is the solution till 20 minutes ago, but I have a browser and I have Google in the other side. I really think that people should use search engine more before asking for help, and learn how to find their needs as part of their professional ability. Forums are extremely important to get help but should come after the the step of Google. In this case, I simply search for what you ask for using your words: azure api python. and first result was the answer
I hope that this cover your need and was helpful 😀