Python
PreviousNext

Step-By-Step

For detailed steps check this article

Example


#Example of using ODBC driver inside Python using pyodbc library (Read more info about pyodbc from below)
#https://github.com/mkleehammer/pyodbc/wiki

import pyodbc 
 
#connect to api service using ZappySys ODBC driver for JSON

#Use DSN 
#conn = pyodbc.connect(r'DSN=MyZappyDsnName;')

# OR Use direct connection string 
conn = pyodbc.connect(
    r'DRIVER={ZappySys JSON Driver};'
    )
cursor = conn.cursor()	
 
#execute query to fetch data from API service
cursor.execute("SELECT * FROM value ORDER BY Country WITH (SRC='http://services.odata.org/V3/Northwind/Northwind.svc/Invoices?$format=json')") 
row = cursor.fetchone() 
while row: 
    print(row[0])
	print(row[1])	
    row = cursor.fetchone()

Articles

Click here to see all articles for [Python] category
How to export REST API to CSV using c# or Python

How to export REST API to CSV using c# or Python

Introduction to export REST API to CSV Export REST API to CSV is in some cases necessary to process the data because many tools can handle CSV files. In this new article, we will show different ways to export the data. The first example will do it using C#. The second example with use Python. Let’s take a […]


How to call REST API in Python (Read JSON / SOAP XML)

How to call REST API in Python (Read JSON / SOAP XML)

Introduction to REST API Call in Python In this article, we will cover how to call REST API in Python without using REST Python client. We will use ZappySys ODBC Driver for JSON / REST API. This driver allows querying RESTful API Services without extensive coding effort. For demo purpose, we will see examples to call […]



Copyrights reserved. ZappySys LLC.