2

How to integrate Tally ERP-9 with Python(Django) for Pushing and pulling amount based on ledger.

Manish Kumar
  • 39
  • 1
  • 8

1 Answers1

2
import pyodbc

conn = pyodbc.connect('DSN=TallyODBC64_9123;SERVER=({local});DRIVER=Tally ODBC DRIVER64;PORT=9123')

cursor=conn.cursor()

data=cursor.execute("SELECT  $Name,$_PrimaryGroup,$_ClosingBalance,$OpeningBalance FROM Ledger")

columns = [column[0] for column in data.description]
actual_cols=[s.strip('$') for s in columns]
rows = data.fetchall()


from dfply import *
import pandas as pd


df = pd.DataFrame.from_records(rows)
df.columns=actual_cols
  • Thanks for your reply. How to push data like 100 INR received, 100 INR to be received in Tally using Python(Django). That Means - Credited and Debited Amount using Ledger. – Manish Kumar Nov 25 '19 at 05:28
  • https://help.tallysolutions.com/article/DeveloperReference/faq/6199.html - this link states that the SQL commands for Tally can only help retrieve data, not push data to Tally. You may have to use XML Soap or TDL for your needs. – Mitalee Rao Feb 07 '20 at 05:20