Running Python code for API implementation

King Java 790 Reputation points
2023-07-10T21:32:53.9233333+00:00

I am trying to find a solution for API implementation for our company.

We have a Python code that connects to source, and bring in data to Azure SQL tables.

All codes are written in Python.

We have used a contractor, and he wrote the code for our company in Python.

He is familiar with AWS, and that is how he used this Python code before.

He is nor familiar with Azure.

He tried using Azure Function to make it work, but it would not bring in data properly.

During the process, it failed or it does not bring enough data, so validation failed many times.

I am trying to find other solution beside using Azure Function this time.

I am thinking either using API apps or WebJos might be the solution (based on bottom URL).

https://learn.microsoft.com/en-us/training/modules/describe-azure-compute-networking-services/7-describe-application-hosting-options

Can anyone give me some suggestion which Azure service I should choose if we already have Python code that connects to the data source using REST and bring in data to Azure SQL tables?

Or should I try using VM (IaaS) to run the Python code first?

Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,934 questions
0 comments No comments
{count} votes

Accepted answer
  1. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-07-12T20:58:58.95+00:00

    Hi @King Java , thanks for the question.

    If you already have Python code that connects to a data source using REST and brings in data to Azure SQL tables, there are several Azure services that you can use to host and run your code.

    1. A great option is Azure App Service, which is a fully managed platform for building, deploying, and scaling web apps. Azure App Service supports Python, and you can use it to host your Python code as a web app that can be accessed via HTTP endpoints.
    2. You can also look into Azure API Management. Azure API Management provides a comprehensive solution for managing, securing, and publishing APIs. You can expose your Python code as an API and leverage the features of API Management, such as rate limiting, authentication, and analytics.
    3. Lastly, you can try Azure Logic Apps. Azure Logic Apps is a cloud-based service that allows you to create workflows and integrate different systems and services. You can create a Logic App that triggers your Python code execution and performs data transfer between your data source and Azure SQL tables.

    To answer your last question, it depends on if you're looking for a Paas or Iaas solution.

    If you prefer to use a virtual machine (VM) to run your Python code, you can use Azure Virtual Machines (VMs) to create and manage VMs in the cloud. Azure VMs support a wide range of operating systems and programming languages, including Python.

    Ultimately, the choice of which Azure service to use depends on your specific requirements scalability requirements, integration needs, and complexity of your Python code.

    If you need more control over the underlying infrastructure and want to run your code on a dedicated VM, then Azure VMs might be the best option. If you want a fully managed platform that can automatically scale and handle the infrastructure for you, then Azure Logic Apps or Azure App Service might be a better fit.

    Hope that helps. let me know if you have further questions

    -Grace


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.