Skip to main content

Crate tallyprime_sdk

Crate tallyprime_sdk 

Source
Expand description

Blocking Rust SDK for TallyPrime over XML/HTTP.

This crate talks to a running TallyPrime instance (default http://localhost:9000) using Tally’s XML messaging format. Requests and responses use UTF-16 so currency symbols such as ₹ round-trip correctly.

§Requirements

  • TallyPrime with XML/HTTP enabled
  • Dates in YYYYMMDD form for most public methods (for example 20250401)
  • Optional company selection via config::TallyConfig::current_company or the active company loaded in Tally

§Quick start

use tallyprime_sdk::config::TallyConfig;
use tallyprime_sdk::TallyClient;

fn main() -> tallyprime_sdk::Result<()> {
    let client = TallyClient::new(TallyConfig {
        host: "localhost".into(),
        port: 9000,
        current_company: Some("My Company Pvt. Ltd.".into()),
        ..Default::default()
    })?;

    client.test_connection()?;
    let ledgers = client.get_ledgers()?;
    println!("Found {} ledgers", ledgers.len());
    Ok(())
}

§Capabilities

  • Masters: read/create ledgers, groups, stock items; read currencies and rich ledger/stock details
  • Vouchers: create accounting vouchers; fetch day-book style voucher ranges
  • Reports: trial balance, balance sheet, profit and loss, GST computation
  • GST: voucher-derived GSTR-1 style summary (TallyClient::get_gstr1) when Tally does not expose a builtin HTTP GSTR-1 report
  • Advanced: lower-level xml_builder::XmlBuilder and TallyClient::post_xml for custom Tally XML flows

§Modules

Re-exports§

pub use crate::client::TallyClient;
pub use crate::client::voucher_parser;
pub use crate::errors::*;
pub use crate::models::*;

Modules§

client
Blocking HTTP client for TallyPrime XML integration.
config
Connection settings for crate::TallyClient.
errors
Error types returned by this crate.
models
Typed request and response models used by crate::TallyClient.
xml_builder
Lower-level builders for Tally XML request envelopes.