Metadata-Version: 2.4
Name: ebicsclient
Version: 1.6.1
Summary: Pure-Python client for the EBICS 3.0 (H005) banking protocol
Project-URL: Homepage, https://github.com/schulluk/ebicsclient
Project-URL: Repository, https://github.com/schulluk/ebicsclient
Project-URL: Issues, https://github.com/schulluk/ebicsclient/issues
Author: Lukas Schulze
License: Copyright © 2026 Lukas Schulze
        
        `ebicsclient` is **source-available** under the **PolyForm Noncommercial License 1.0.0**
        (full text below).
        
        - **Free for noncommercial use** — personal, research, education, hobby, and other noncommercial
          purposes, as defined in the license.
        - **Commercial or business use requires a separate paid license.** To obtain one, contact
          **Lukas Schulze** &lt;ebicsclient5@a.schulze.uno&gt;.
        
        Required Notice: Copyright © 2026 Lukas Schulze
        
        ---
        
        # PolyForm Noncommercial License 1.0.0
        
        <https://polyformproject.org/licenses/noncommercial/1.0.0>
        
        ## Acceptance
        
        In order to get any license under these terms, you must agree to them as both strict obligations and conditions to all your licenses.
        
        ## Copyright License
        
        The licensor grants you a copyright license for the software to do everything you might do with the software that would otherwise infringe the licensor's copyright in it for any permitted purpose.  However, you may only distribute the software according to [Distribution License](#distribution-license) and make changes or new works based on the software according to [Changes and New Works License](#changes-and-new-works-license).
        
        ## Distribution License
        
        The licensor grants you an additional copyright license to distribute copies of the software.  Your license to distribute covers distributing the software with changes and new works permitted by [Changes and New Works License](#changes-and-new-works-license).
        
        ## Notices
        
        You must ensure that anyone who gets a copy of any part of the software from you also gets a copy of these terms or the URL for them above, as well as copies of any plain-text lines beginning with `Required Notice:` that the licensor provided with the software.  For example:
        
        > Required Notice: Copyright Yoyodyne, Inc. (http://example.com)
        
        ## Changes and New Works License
        
        The licensor grants you an additional copyright license to make changes and new works based on the software for any permitted purpose.
        
        ## Patent License
        
        The licensor grants you a patent license for the software that covers patent claims the licensor can license, or becomes able to license, that you would infringe by using the software.
        
        ## Noncommercial Purposes
        
        Any noncommercial purpose is a permitted purpose.
        
        ## Personal Uses
        
        Personal use for research, experiment, and testing for the benefit of public knowledge, personal study, private entertainment, hobby projects, amateur pursuits, or religious observance, without any anticipated commercial application, is use for a permitted purpose.
        
        ## Noncommercial Organizations
        
        Use by any charitable organization, educational institution, public research organization, public safety or health organization, environmental protection organization, or government institution is use for a permitted purpose regardless of the source of funding or obligations resulting from the funding.
        
        ## Fair Use
        
        You may have "fair use" rights for the software under the law. These terms do not limit them.
        
        ## No Other Rights
        
        These terms do not allow you to sublicense or transfer any of your licenses to anyone else, or prevent the licensor from granting licenses to anyone else.  These terms do not imply any other licenses.
        
        ## Patent Defense
        
        If you make any written claim that the software infringes or contributes to infringement of any patent, your patent license for the software granted under these terms ends immediately. If your company makes such a claim, your patent license ends immediately for work on behalf of your company.
        
        ## Violations
        
        The first time you are notified in writing that you have violated any of these terms, or done anything with the software not covered by your licenses, your licenses can nonetheless continue if you come into full compliance with these terms, and take practical steps to correct past violations, within 32 days of receiving notice.  Otherwise, all your licenses end immediately.
        
        ## No Liability
        
        ***As far as the law allows, the software comes as is, without any warranty or condition, and the licensor will not be liable to you for any damages arising out of these terms or the use or nature of the software, under any kind of legal claim.***
        
        ## Definitions
        
        The **licensor** is the individual or entity offering these terms, and the **software** is the software the licensor makes available under these terms.
        
        **You** refers to the individual or entity agreeing to these terms.
        
        **Your company** is any legal entity, sole proprietorship, or other kind of organization that you work for, plus all organizations that have control over, are under the control of, or are under common control with that organization.  **Control** means ownership of substantially all the assets of an entity, or the power to direct its management and policies by vote, contract, or otherwise.  Control can be direct or indirect.
        
        **Your licenses** are all the licenses granted to you for the software under these terms.
        
        **Use** means anything you do with the software requiring one of your licenses.
License-File: LICENSE.md
Keywords: banking,camt,ebics,fintech,h005,iso20022
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Financial and Insurance Industry
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Office/Business :: Financial
Classifier: Typing :: Typed
Requires-Python: >=3.11
Requires-Dist: cryptography
Requires-Dist: lxml
Provides-Extra: pdf
Requires-Dist: reportlab; extra == 'pdf'
Provides-Extra: tls
Requires-Dist: certifi; extra == 'tls'
Description-Content-Type: text/markdown

# ebicsclient — a pure-Python EBICS 3.0 (H005) client

A Python client for the **EBICS** banking protocol (EBICS 3.0 / H005):
download statements and initiate payments over a single, source-available library. Validated
live against Zürcher Kantonalbank (ZKB).

## Install

```console
pip install ebicsclient          # add [pdf] for PDF letters, [tls] for the certifi CA bundle
```

## Quickstart

```python
from ebicsclient import Bank, User, Client, generate_keyring, save_keyring, PAIN_001

bank = Bank(host_id="HOST1", url="https://ebicsweb.example.com/ebicsweb")
user = User(partner_id="PARTNER1", user_id="USER1")

# 1. Generate the three RSA key pairs (once) and store them encrypted.
keyring = generate_keyring()
save_keyring(keyring, "keyring.json", passphrase="…")

client = Client(bank, user, keyring)

# 2. Key initialisation: submit your keys, then print/sign/send the letter and wait for activation.
client.ini()
client.hia()
letter = client.make_ini_letter()          # HTML, or PDF with the optional [pdf] extra
# … send letter.content to the bank; once activated:

# 3. Fetch the bank's public keys (verify their published hashes out of band).
client.hpb()

# 4. Read: download and parse the end-of-day statements.
for statement in client.download_statements():
    print(statement.iban, statement.closing_balance)

# 5. Write: initiate a payment (a pain.001.001.09 document, as bytes).
transaction_id = client.upload(PAIN_001, pain001_bytes)
```

The certificate-based (*mit Zertifikaten*) profile is a constructor option — see
[docs/11-certificate-profiles.md](https://github.com/schulluk/ebicsclient/blob/main/docs/11-certificate-profiles.md).

More worked examples — a non-acking peek, a consume-safe sync, a dated backfill, a payment
round-trip, and certificate-profile onboarding — are in
[examples/](https://github.com/schulluk/ebicsclient/blob/main/examples/README.md).

> ### ⚠️ Loading EBICS identifiers from a config file? Quote them.
>
> EBICS IDs **can** carry leading zeros (a real Partner ID may look like `00123456`) and ISO
> versions look like `"08"`. Unquoted in YAML/JSON/TOML these parse as **numbers** — the wrong
> type *and* silently stripped of their zeros. Always quote them (`partner_id: "00123456"`); the
> library rejects non-string values, but the fix is quoting, never `str()`-wrapping the parsed
> number (which keeps the wrong, zero-stripped identifier). The same applies to numeric-looking
> keyring passphrases.

## What it does

Key ceremony (INI/HIA/HPB), statement/report downloads (camt.053/052/054, pain.002) with optional
dated ranges, and payment uploads (pain.001) — read and write validated live against ZKB. Pure
Python (`cryptography`, `lxml`), no PHP/Java sidecar. Not yet built: multi-person signatures
(EDS/VEU), key rotation, and several administrative order types.

Full capability-by-capability coverage, gaps, and verification status:
**[docs/13-standard-conformance.md](https://github.com/schulluk/ebicsclient/blob/main/docs/13-standard-conformance.md)**.

## Why this exists

It was built for [WealthTracker](https://github.com/schulluk/WealthTracker), which needs to pull
bank statements over EBICS — and no pure-Python client for EBICS 3.0 (H005) existed to build on.
Rather than shell out to a PHP/Java sidecar or a proprietary dependency, ebicsclient is a clean,
reusable library that any application can embed. See
[docs/03-library-landscape.md](https://github.com/schulluk/ebicsclient/blob/main/docs/03-library-landscape.md) for the existing options and the gap.

## Why only EBICS 3.0 (H005)?

By design. EBICS access now requires **H005** (the pre-3.0 protocol was retired ~Nov 2025), and
the ISO 20022 "2009" message vintage retires **21 Nov 2026** — so supporting legacy versions
would be building for the past. The `protocol/` layer is seamed for a *future* EBICS version, not
older ones. The regulatory deadlines are in [docs/01](https://github.com/schulluk/ebicsclient/blob/main/docs/01-protocol-and-formats.md); the scope
decision in [docs/04](https://github.com/schulluk/ebicsclient/blob/main/docs/04-implementation-plan.md).

## Documentation

| Doc | Contents |
|---|---|
| [docs/01-protocol-and-formats.md](https://github.com/schulluk/ebicsclient/blob/main/docs/01-protocol-and-formats.md) | EBICS/H005 background, the two regulatory deadlines, message formats |
| [docs/02-licensing-strategy.md](https://github.com/schulluk/ebicsclient/blob/main/docs/02-licensing-strategy.md) | Dual-licensing plan, legal reasoning, reimplementation |
| [docs/03-library-landscape.md](https://github.com/schulluk/ebicsclient/blob/main/docs/03-library-landscape.md) | Existing EBICS libraries and the gap this library fills |
| [docs/04-implementation-plan.md](https://github.com/schulluk/ebicsclient/blob/main/docs/04-implementation-plan.md) | Scope, modules, the two hard parts, build order, test strategy |
| [docs/05-zkb-onboarding.md](https://github.com/schulluk/ebicsclient/blob/main/docs/05-zkb-onboarding.md) | The INI/HIA + signed-letter ceremony, re-initialisation, ZKB order params |
| [docs/06-engineering-conventions.md](https://github.com/schulluk/ebicsclient/blob/main/docs/06-engineering-conventions.md) | Baseline practices: layout, logging, errors, security, typing, testing, CI |
| [docs/07-handshake-testing.md](https://github.com/schulluk/ebicsclient/blob/main/docs/07-handshake-testing.md) | Validating INI/HIA/HPB + download/upload against the ZKB test platform |
| [docs/08-parity-and-xsd-findings.md](https://github.com/schulluk/ebicsclient/blob/main/docs/08-parity-and-xsd-findings.md) | The inclusive-vs-exclusive c14n correction and verification discipline |
| [docs/09-zkb-test-platform-settings.md](https://github.com/schulluk/ebicsclient/blob/main/docs/09-zkb-test-platform-settings.md) | What the ZKB test platform exposes, and its upload/simulation model |
| [docs/10-btf-order-types.md](https://github.com/schulluk/ebicsclient/blob/main/docs/10-btf-order-types.md) | ZKB's EBICS order-type → H005 BTF catalogue |
| [docs/11-certificate-profiles.md](https://github.com/schulluk/ebicsclient/blob/main/docs/11-certificate-profiles.md) | "mit Schlüsseln" vs "mit Zertifikaten", and the certificate seam |
| [docs/12-verification-ledger.md](https://github.com/schulluk/ebicsclient/blob/main/docs/12-verification-ledger.md) | Every protocol claim → spec citation → oracle → status; the 2.5→3.0 audit |
| [docs/13-standard-conformance.md](https://github.com/schulluk/ebicsclient/blob/main/docs/13-standard-conformance.md) | Coverage & gaps: every H005 order type — supported or not, and how far verified |

## Development

Contributors: see [CONTRIBUTING.md](https://github.com/schulluk/ebicsclient/blob/main/CONTRIBUTING.md). One-command setup with `uv`:
`git clone https://github.com/schulluk/ebicsclient && cd ebicsclient && uv sync --all-groups`
(or `pip install -e . --group dev` on pip ≥ 25.1). This is a money-moving library — the
engineering bar is [docs/06-engineering-conventions.md](https://github.com/schulluk/ebicsclient/blob/main/docs/06-engineering-conventions.md).

## License

Source-available under the **PolyForm Noncommercial License 1.0.0** — **free for noncommercial
use**; commercial/business use requires a paid license. See
[LICENSE.md](https://github.com/schulluk/ebicsclient/blob/main/LICENSE.md) and the
rationale in [docs/02-licensing-strategy.md](https://github.com/schulluk/ebicsclient/blob/main/docs/02-licensing-strategy.md).
