[![CI - build](https://img.shields.io/github/actions/workflow/status/tkarabela/okane/main.yml?branch=master)](https://github.com/tkarabela/okane/actions)
[![CI - coverage](https://img.shields.io/codecov/c/github/tkarabela/okane)](https://app.codecov.io/github/tkarabela/okane)
# お<ruby>金<rt>かね</rt></ruby> 【okane】
_okane_ is a pure Python parser for bank statements in camt.053 XML format, in dialect
used by the Czech Banking Association (ČBA).
It parses `BkToCstmrStmt` XML element into `okane.BankToCustomerStatement` which is
a Pydantic model.
## Example
```
$ head my_banking_statement.xml
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Document xmlns="urn:iso:std:iso:20022:tech:xsd:camt.053.001.02">
<BkToCstmrStmt>
<GrpHdr>
<MsgId>camt.053-2023-04-01-001</MsgId>
<CreDtTm>2023-04-01T12:00:00.000+02:00</CreDtTm>
<MsgRcpt>
<Nm>John Doe</Nm>
$ ./okane.py my_banking_statement.xml
{
"statement_id": "XXX-STATEMENT-ID",
"created_time": "2023-04-01T12:00:00+02:00",
"from_time": "2023-03-01T00:00:00+01:00",
"to_time": "2023-03-31T00:00:00+02:00",
"account_iban": "XXX-IBAN",
"opening_balance": {
"amount": 1000.0,
"currency": "CZK",
"date": "2023-03-31"
},
"closing_balance": {
"amount": 2000.0,
"currency": "CZK",
"date": "2023-03-31"
},
"transactions": [
{
"ref": "XXX-REF-1",
"amount": 1500.0,
"currency": "CZK",
"val_date": "2023-04-01",
"remote_info": "Incoming payment",
"additional_transaction_info": null,
"related_account": null,
"related_account_bank": null
},
{
"ref": "XXX-REF-2",
"amount": -500.0,
"currency": "CZK",
"val_date": "2023-04-01",
"remote_info": "Outbound payment",
"additional_transaction_info": null,
"related_account": null,
"related_account_bank": null
}
]
}
```
## License
MIT - see [LICENSE.txt](./LICENSE.txt).
Raw data
{
"_id": null,
"home_page": "https://github.com/tkarabela/okane",
"name": "okane",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10,<4.0",
"maintainer_email": "",
"keywords": "finance,czech,banking,sepa,expenses,camt053",
"author": "Tomas Karabela",
"author_email": "tkarabela@seznam.cz",
"download_url": "https://files.pythonhosted.org/packages/82/1c/32d5493c1af01b49f2e1b04e04ed3509579215dca20650e3feef59b082ad/okane-0.1.0.tar.gz",
"platform": null,
"description": "[![CI - build](https://img.shields.io/github/actions/workflow/status/tkarabela/okane/main.yml?branch=master)](https://github.com/tkarabela/okane/actions)\n[![CI - coverage](https://img.shields.io/codecov/c/github/tkarabela/okane)](https://app.codecov.io/github/tkarabela/okane)\n\n# \u304a<ruby>\u91d1<rt>\u304b\u306d</rt></ruby> \u3010okane\u3011\n\n_okane_ is a pure Python parser for bank statements in camt.053 XML format, in dialect\nused by the Czech Banking Association (\u010cBA).\n\nIt parses `BkToCstmrStmt` XML element into `okane.BankToCustomerStatement` which is\na Pydantic model.\n\n## Example\n\n```\n$ head my_banking_statement.xml\n<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>\n<Document xmlns=\"urn:iso:std:iso:20022:tech:xsd:camt.053.001.02\">\n <BkToCstmrStmt>\n <GrpHdr>\n <MsgId>camt.053-2023-04-01-001</MsgId>\n <CreDtTm>2023-04-01T12:00:00.000+02:00</CreDtTm>\n <MsgRcpt>\n <Nm>John Doe</Nm>\n\n$ ./okane.py my_banking_statement.xml\n{ \n \"statement_id\": \"XXX-STATEMENT-ID\", \n \"created_time\": \"2023-04-01T12:00:00+02:00\",\n \"from_time\": \"2023-03-01T00:00:00+01:00\", \n \"to_time\": \"2023-03-31T00:00:00+02:00\", \n \"account_iban\": \"XXX-IBAN\", \n \"opening_balance\": { \n \"amount\": 1000.0,\n \"currency\": \"CZK\",\n \"date\": \"2023-03-31\"\n },\n \"closing_balance\": {\n \"amount\": 2000.0,\n \"currency\": \"CZK\",\n \"date\": \"2023-03-31\"\n },\n \"transactions\": [\n {\n \"ref\": \"XXX-REF-1\",\n \"amount\": 1500.0,\n \"currency\": \"CZK\",\n \"val_date\": \"2023-04-01\",\n \"remote_info\": \"Incoming payment\",\n \"additional_transaction_info\": null,\n \"related_account\": null,\n \"related_account_bank\": null\n },\n {\n \"ref\": \"XXX-REF-2\",\n \"amount\": -500.0,\n \"currency\": \"CZK\",\n \"val_date\": \"2023-04-01\",\n \"remote_info\": \"Outbound payment\",\n \"additional_transaction_info\": null,\n \"related_account\": null,\n \"related_account_bank\": null\n }\n ]\n}\n\n```\n\n\n## License\n\nMIT - see [LICENSE.txt](./LICENSE.txt).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Parser for bank statements in camt.053 XML format (Czech Banking Association dialect)",
"version": "0.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/tkarabela/okane/issues",
"Homepage": "https://github.com/tkarabela/okane",
"Repository": "https://github.com/tkarabela/okane"
},
"split_keywords": [
"finance",
"czech",
"banking",
"sepa",
"expenses",
"camt053"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e7a3a9e7c89e8ec3e61e476f0fa1431dddcd3d3cf0c3090b8485cf89ad12c48d",
"md5": "21bc8cd594c7784dfe21ff4bbaf857cf",
"sha256": "690a645c02a616d6bc4fc0d36260bf4a410bc2a5e3e36c899ed0501bd0e201f9"
},
"downloads": -1,
"filename": "okane-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "21bc8cd594c7784dfe21ff4bbaf857cf",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10,<4.0",
"size": 5575,
"upload_time": "2023-11-17T01:35:20",
"upload_time_iso_8601": "2023-11-17T01:35:20.039473Z",
"url": "https://files.pythonhosted.org/packages/e7/a3/a9e7c89e8ec3e61e476f0fa1431dddcd3d3cf0c3090b8485cf89ad12c48d/okane-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "821c32d5493c1af01b49f2e1b04e04ed3509579215dca20650e3feef59b082ad",
"md5": "eda9eaebd5fe8acc16951ee299d49f17",
"sha256": "53e3afd50922041fcb209462c8940ec67b6fa0a5d7746edc6b2cf5e238178b7a"
},
"downloads": -1,
"filename": "okane-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "eda9eaebd5fe8acc16951ee299d49f17",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10,<4.0",
"size": 7096,
"upload_time": "2023-11-17T01:35:22",
"upload_time_iso_8601": "2023-11-17T01:35:22.110676Z",
"url": "https://files.pythonhosted.org/packages/82/1c/32d5493c1af01b49f2e1b04e04ed3509579215dca20650e3feef59b082ad/okane-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-17 01:35:22",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "tkarabela",
"github_project": "okane",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "okane"
}