TallyPy is a robust Python-based suite designed to extract accounting and inventory data from Tally using dynamic TDL over XML. It eliminates the need for external TDL files or ODBC drivers, providing a seamless bridge between Tally and data analysis tools like Power BI, CSV, and Excel.
- 100% XML Extraction: Uses dynamic TDL injection via XML requests—no installation required in Tally.
- Auto-Detection: Automatically detects the active company name and financial period (Starting From/Ending At) from Tally.
- Accounting Data: Robust extraction of Ledgers and Vouchers (Sales, Purchase, Journal, Receipt, Payment, etc.).
- Inventory Data: Specialized extraction of Stock Items and Stock Vouchers, including Receipt Notes, Delivery Notes, and Stock Journals.
- Python Desktop Utility: A Tkinter interface (
tally_xml_exporter.py) to load, preview with pagination, and export Tally data as CSV. - Power BI Ready: Optimized Python scripts designed to be used directly within Power BI's
Python.Executedata source.
tally_xml_exporter.py: The main Python desktop utility with CSV-backed pagination for large exports.tally_ledgers.py: Extractor for Ledger masters.tally_vouchers.py: Extractor for Accounting transactions.tally_stock_items.py: Extractor for Stock Item masters.tally_stock_vouchers.py: Extractor for Inventory transactions (Stock Ledgers).requirements.txt: List of Python dependencies.
- Tally Running: Tally must be open with at least one company loaded.
- Connectivity: Ensure the Tally ODBC/XML port is enabled (Default: 9000).
- Verify in Tally:
F1>Settings>Connectivity.
- Verify in Tally:
- Python Environment: Python 3.8+ installed.
-
Clone the repository:
git clone https://github.com/SRathinaGiri/TallyPy.git cd TallyPy -
Install dependencies:
pip install -r requirements.txt
-
Run the desktop exporter:
python tally_xml_exporter.py
You can use the scripts in this project directly in Power BI Desktop:
- Go to Get Data > Python Script.
- Copy the contents of the desired
.pyfile. - Replace the
HOSTandPORTvariables if your Tally is not onlocalhost:9000. - Power BI will generate a table named
datasetcontaining your Tally data.
This project is licensed under the MIT License - see the LICENSE file for details.