Decrypt and parse Indian ITD Annual Information Statement (AIS) JSON locally
Project description
aisparser
Parse the Indian Income Tax Department's Annual Information Statement (AIS) JSON locally into typed, structured data. Zero network calls, in-memory decryption, and no silently dropped data — every leaf of the decrypted file is either typed, kept verbatim in a generic record, or reported in a redaction-safe warning.
Package name vs import name: the distribution is
itd-aisparser, but the import and the CLI are bothaisparser—pip install itd-aisparser, thenimport aisparser/aisparser summary. The PyPI nameaisparseris occupied by an abandoned maritime-AIS (ship-tracking) package, so this project ships under theitd-prefix.
Install
pip install itd-aisparser
With the optional pandas DataFrame adapter:
pip install "itd-aisparser[pandas]"
Quickstart
from aisparser import read_ais
statement = read_ais(
path="ABCDE1234A_2025-26_AIS_03072026.json",
password="ABCDE1234A21011991",
)
statement.assessment_year # "2026-27" — detected from the portal filename
statement.parse_warnings # redaction-safe structural warnings (labels only, never values)
statement.to_dict() # plain-dict dump of the full typed statement
# With the [pandas] extra installed:
frames = statement.to_df() # dict of category-keyed DataFrames
The password is your PAN (any case) followed by your date of birth as DDMMYYYY. The library resolves casing and the internal ITD key-derivation details automatically.
What parses typed vs generic
| Category | AIS part | Typed model | What you get |
|---|---|---|---|
| TDS entries (salary, dividend) | Part B1 (TDS/TCS) | TdsEntryRecord |
Per-quarter amount paid/credited plus TDS deducted and deposited as exact Decimals |
| TCS / outward foreign remittance | Part B1 (TDS/TCS) | TcsEntryRecord |
Amount received/debited, tax collected, and TCS deposited per quarter as exact Decimals |
| Interest from savings bank | Part B2 (SFT) | SavingsInterestRecord |
Account number and type, reporting date, and the interest amount as an exact Decimal |
| Dividend (SFT) | Part B2 (SFT) | SftDividendRecord |
Reporting date and dividend amount as an exact Decimal, per reporting entity |
| Sale of securities and mutual fund units | Part B2 (SFT) | SecuritiesSaleRecord |
Sale date, security identity and class, quantity, sale consideration, cost of acquisition, and FMV as Decimals |
| Purchase of securities and mutual fund units | Part B2 (SFT) | SecuritiesPurchaseRecord |
Quarterly market purchase and sale totals per client/holder as exact Decimals |
| Payment of taxes | Part B3 | TaxPaymentRecord |
Challan identity (BSR code, serial, CIN) with the tax/surcharge/cess breakup as Decimals |
| Refund | Part B4 | RefundRecord |
Refund amount, mode, nature, and payment date keyed by financial year |
| Salary (Annexure II) | Part B7 (other information) | SalaryAnnexureRecord |
Employment period and the gross-salary breakup u/s 17(1)/(2)/(3) as exact Decimals |
| Interest on income tax refund | Part B7 (other information) | RefundInterestRecord |
Assessment-year-keyed refund-interest amounts as exact Decimals |
All other categories (57+ in the CBDT list) parse generically with verbatim field names
and redaction-safe warnings — no data is silently dropped — and reporter-level rollups
arrive typed as CategorySummaryRecord.
Downloading your AIS from the portal
- Log in at the e-Filing portal: https://www.incometax.gov.in/
- Open "Annual Information Statement (AIS)" from the e-File menu — the portal hands off to the AIS/compliance portal.
- On the AIS tile, pick the financial year and download the JSON format.
- The file arrives named
{PAN}_{FY}_AIS_{DDMMYYYY}.json— keep this name so aisparser can detect the assessment year from it. The filename token is the financial year; aisparser converts FY to AY internally. A renamed file still works: passassessment_year=in Python or--assessment-yearon the CLI. - The password is your PAN followed by your date of birth as DDMMYYYY.
CLI
aisparser summary ABCDE1234A_2025-26_AIS_03072026.json
aisparser export ABCDE1234A_2025-26_AIS_03072026.json -o out.csv
aisparser fingerprint ABCDE1234A_2025-26_AIS_03072026.json
- The password is read from a hidden prompt by default; for scripting, set the
AISPARSER_PASSWORDenvironment variable or use--password-file. There is no--passwordargv option by design. --assessment-yearoverrides filename detection when the file has been renamed.aisparser fingerprintprints a redaction-safe schema fingerprint per category — category names and column labels only, never values — safe to paste into a GitHub issue.
Privacy guarantees
- No network: zero network calls at runtime and no HTTP client anywhere in the dependency tree — see SECURITY.md for the auditable proof.
- In-memory only: decryption never touches disk; no temp files are ever written — see SECURITY.md for the enforcing test.
- Value-free errors and warnings: no password, PAN, or financial value ever appears in an error, warning, or log — see SECURITY.md for how this is asserted.
License
MIT — see LICENSE.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file itd_aisparser-0.1.2.tar.gz.
File metadata
- Download URL: itd_aisparser-0.1.2.tar.gz
- Upload date:
- Size: 91.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
90190f315bfb4258be032571a99d2b7ae8b5b75dc19377bd075aa427c0acd1dd
|
|
| MD5 |
3773f05a3bc85ac6cc74e7b608196502
|
|
| BLAKE2b-256 |
3724f4131ba0ba112058c13f8fd9e8739385008c87fefad838be06ca952047c3
|
Provenance
The following attestation bundles were made for itd_aisparser-0.1.2.tar.gz:
Publisher:
release.yml on niladridasroy/itd-aisparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
itd_aisparser-0.1.2.tar.gz -
Subject digest:
90190f315bfb4258be032571a99d2b7ae8b5b75dc19377bd075aa427c0acd1dd - Sigstore transparency entry: 2197237426
- Sigstore integration time:
-
Permalink:
niladridasroy/itd-aisparser@ba6e9aac66bb858daa2bf129e6e0fe298e0ee9ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/niladridasroy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ba6e9aac66bb858daa2bf129e6e0fe298e0ee9ec -
Trigger Event:
push
-
Statement type:
File details
Details for the file itd_aisparser-0.1.2-py3-none-any.whl.
File metadata
- Download URL: itd_aisparser-0.1.2-py3-none-any.whl
- Upload date:
- Size: 43.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d6d7d600334b989ab54a63bcfbe48dff2dad6aba592d866b1005317930e9c0e4
|
|
| MD5 |
467772a2d1953be6f2581f3313fee111
|
|
| BLAKE2b-256 |
f7bab2d073fcd7b3229dd971934b35628fd844fdb7ea99ded69dd09af54495d0
|
Provenance
The following attestation bundles were made for itd_aisparser-0.1.2-py3-none-any.whl:
Publisher:
release.yml on niladridasroy/itd-aisparser
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
itd_aisparser-0.1.2-py3-none-any.whl -
Subject digest:
d6d7d600334b989ab54a63bcfbe48dff2dad6aba592d866b1005317930e9c0e4 - Sigstore transparency entry: 2197237511
- Sigstore integration time:
-
Permalink:
niladridasroy/itd-aisparser@ba6e9aac66bb858daa2bf129e6e0fe298e0ee9ec -
Branch / Tag:
refs/heads/main - Owner: https://github.com/niladridasroy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@ba6e9aac66bb858daa2bf129e6e0fe298e0ee9ec -
Trigger Event:
push
-
Statement type: