Metadata-Version: 2.5
Name: india-gst-kit
Version: 0.1.1
Summary: GSTIN validation, CGST/SGST/IGST split, GSTR-1 style sales register and a CA-ready Excel workbook, from plain Python data.
Author: Hexaspace
License-Expression: MIT
License-File: LICENSE
Keywords: accounting,gst,gstin,gstr-1,hsn,india,invoice,tally,tax
Classifier: Intended Audience :: Developers
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Office/Business :: Financial :: Accounting
Requires-Python: >=3.10
Provides-Extra: excel
Requires-Dist: openpyxl>=3.1; extra == 'excel'
Provides-Extra: test
Requires-Dist: openpyxl>=3.1; extra == 'test'
Requires-Dist: pytest>=7; extra == 'test'
Description-Content-Type: text/markdown

# india-gst-kit

Small, dependency-free Python tools for Indian GST:

- **GSTIN validation**: format, state code, check digit, and a match against the customer's state
- **Tax split**: CGST + SGST (same state) or IGST (other state), for GST-inclusive or exclusive amounts
- **Sales register**: one row per invoice per GST rate (the GSTR-1 shape), B2B/B2C split, HSN summary
- **Checks for your CA**: missing HSN codes, GSTIN/state mismatches, unpaid invoices, advances before invoice
- **Excel workbook** (optional) your CA can open straight away

Works with plain dicts, so it fits any database or framework (Django, FastAPI, Flask, scripts).

## Install

```bash
pip install india-gst-kit            # core, no dependencies
pip install "india-gst-kit[excel]"   # + Excel export
```

## 30-second example

```python
from india_gst import validate, split, build_register
from india_gst.excel import to_xlsx

validate("27AAPFU0939F1ZV", state="Maharashtra")   # -> "27AAPFU0939F1ZV"
split(1180, 18, seller_state="Gujarat", place_of_supply="Gujarat")
# TaxSplit(taxable=1000.0, cgst=90.0, sgst=90.0, igst=0.0, total=1180.0)

invoices = [{
    "invoice_no": "INV-1", "invoice_date": "2026-11-02",
    "customer": "Sample Buyer LLP", "gstin": "27AAPFU0939F1ZV", "place_of_supply": "Maharashtra",
    "lines": [{"name": "Wardrobe", "hsn": "9403", "qty": 1, "gst_pct": 18, "amount": 1180}],
}]
reg = build_register(invoices, seller_state="Gujarat", period=("2026-11-01", "2026-11-30"))
open("gst-nov.xlsx", "wb").write(to_xlsx(reg, seller_name="Your Company"))
```

## Roadmap

- 0.2: Tally Prime XML export (sales vouchers and receipts)
- 0.3: GSTR-1 JSON for the GST portal offline tool
- Credit and debit notes

Ideas and pull requests are welcome; see [CONTRIBUTING.md](CONTRIBUTING.md).

## Not tax advice

This library helps prepare data. Always confirm filings with your Chartered Accountant.

## Licence

MIT. Built and used in production by [Hexaspace](https://hexaspace.in).
