Posts

Showing posts from November, 2020

Simple API using Python, Flask and pyodbc

Image
  Hi Guys, I recently learnt the fundamentals of python, one of widely used languages right now. It is super fast in executing and I recommend everyone to give it a try. So I decided to the create a Simple API which will connect to a SQL Server database to perform CRUD operations. Hope you enjoy.  1) Make sure you have installed python     Go to command prompt type " python --version ", it will return the installed version of python in your computer as shown in the image. If it throws an error, don't worry you can go   to https://www.python.org/downloads/ to download the latest version of python to your pc 2) Install pyodbc to connect to SQL Server Database      Go to command prompt type " pip install pyodbc " 3) Install flask to create the api application      Go to command prompt type " pip install flask " 4) Open Visual Studio Code and create a new file "sqlapi.py" and paste the following code import  pyodbc  impor...