Search code examples
python-3.xpython-2.7azure-functionsazure-function-appazure-queues

Create a Azure function in Python on Visual Studio Code to trigger queue


I am trying to

Create a Azure function in Python on Visual Studio Code to trigger queue.

also i am trying to

Get data from queue and save messages from queue in sql server using python.

Can anyone help?


Solution

  • Create a Azure function in Python on Visual Studio Code to trigger queue.

    1, Azure functions develop mainly need two things: language environment and azure function core tools.

    Total steps:

    https://learn.microsoft.com/en-us/azure/developer/python/tutorial-vs-code-serverless-python-01

    2, There is no easy way to get message from azure queue storage. This doc will tells you every steps and basiclly concepts:

    https://learn.microsoft.com/en-us/azure/storage/queues/storage-quickstart-queues-python

    Get data from queue and save messages from queue in sql server using python.

    It is just the same with other simple python script, you can follow this:

    https://datatofish.com/how-to-connect-python-to-sql-server-using-pyodbc/

    The code of getting message from queue and putting message to sql db needs to put to the body of your function.