]> git.ipfire.org Git - thirdparty/python-fints.git/commit
Improve dialog handling: Drastically reduce latancy.
authorHenryk Plötz <henryk@ploetzli.ch>
Tue, 21 Aug 2018 07:34:02 +0000 (09:34 +0200)
committerRaphael Michel <mail@raphaelmichel.de>
Mon, 3 Dec 2018 18:34:29 +0000 (19:34 +0100)
commitb3d8a7761871f0555793f80a10f2ea75476bfeb4
treef2c4e84734119392fd13b7324c70d575cbe93b9f
parent2d703f0da950b385612cc5ed2d2976759f784ff6
Improve dialog handling: Drastically reduce latancy.
 + Make FinTSDialog re-entrant: Entering the context multiple times will only init()/end() at the outermost layer
 + Turn FinTSClient into a context manager. Entering it will start a dialog that will be kept open, no need to repeatedly start/end dialogues

Example:
````
f = FinTS3PinTanClient(...)
with f:
    accounts = f.get_sepa_accounts()
    balance = f.get_balance(accounts[0])
    statement = f.get_statement(accounts[0])
````
fints/client.py
fints/dialog.py