(Karvy/Kfintech/CAMS) Consolidated Account Statement (CAS) PDF parser
Project description
CASParser
Parse Consolidated Account Statement (CAS) PDF files generated from CAMS/KFINTECH
Installation
pip install casparser
with faster PyMuPDF parser
pip install casparser[mupdf]
Note: Enabling this dependency could result in licensing changes. Check the License section for more details
Usage
import casparser
data = casparser.read_cas_pdf('/path/to/cas/pdf/file.pdf', 'password')
Data structure
{
"statement_period": {
"from": "YYYY-MMM-DD",
"to": "YYYY-MMM-DD"
},
"file_type": "CAMS/KARVY/UNKNOWN",
"investor_info": {
"email": "string",
"name": "string",
"mobile": "string",
"address": "string"
},
"folios": [
{
"folio": "string",
"amc": "string",
"PAN": "string",
"KYC": "OK/NOT OK",
"PANKYC": "OK/NOT OK",
"schemes": [
{
"scheme": "string",
"advisor": "string",
"rta_code": "string",
"rta": "string",
"open": "number",
"close": "number",
"transactions": [
{
"date": "YYYY-MM-DD",
"description": "string",
"amount": "number",
"units": "number",
"nav": "number",
"balance": "number"
}
]
}
]
}
]
}
CLI
Usage: casparser [-o output_file.json] [-p password] [-s] CAS_PDF_FILE
Options:
-o, --output FILE Output file path (json)
-s, --summary Print Summary of transactions parsed.
-p PASSWORD CAS password
--version Show the version and exit.
--help Show this message and exit.
Demo
License
CASParser is distributed under MIT license by default. However enabling the optional dependency
mupdf
would imply the use of PyMuPDF /
MuPDF and hence the licenses GNU GPL v3 and GNU Affero GPL v3
would apply. Copies of all licenses have been included in this repository. - IANAL
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
casparser-0.3.3.tar.gz
(12.6 kB
view hashes)
Built Distribution
casparser-0.3.3-py3-none-any.whl
(16.0 kB
view hashes)
Close
Hashes for casparser-0.3.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7884304d6da1fa3acf2dd78b951ceb0194467e4ebb93dae9d3873c14f6c8943b |
|
MD5 | cdcb3b4a5ad5d7391066b19e41a7815c |
|
BLAKE2b-256 | ffebcb3ec627f59386b2485d552859877eabe419cde104cceac9a8bc67323810 |