# GST Validator India 🇮🇳

[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)
[![Python Version](https://img.shields.io/badge/python-3.9%2B-brightgreen.svg)](https://www.python.org/)

`gst_validator_india` is a precision-engineered Python library developed for the validation, remediation, and metadata extraction of Indian Goods and Services Tax Identification Numbers (GSTINs).

Designed for seamless integration into Enterprise Resource Planning (ERP) systems, tax compliance software, and Optical Character Recognition (OCR) based invoice processing utilities, this package provides the requisite structural intelligence to manage Indian GST data accurately within production environments.

## Features

* **Checksum Validation:** Incorporates the exact left-to-right weighting logic employed by the Goods and Services Tax Network (GSTN) portal. This ensures accurate validation for prominent corporate entities (e.g., Mahindra & Mahindra, Tata, Reliance).
* **OCR Repair Engine:** Context-aware correction of common OCR errors (e.g., mistaking '0' for 'O' based on its position in the PAN vs. State Code).
* **Compliance Heuristics:** Identify potential Composition Dealers and validate Reverse Charge Mechanism (RCM) applicability.
* **Metadata Extraction:** Instantly decode State names, PAN entity types (Company, Individual, etc.), and transaction types (Inter-state vs. Intra-state).
* **Tax Structure Verification:** Cross-checks if CGST/SGST/IGST amounts match the transaction logic.

## Installation

Install the package via pip:

```bash
pip install gst_validator_india