]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Minor readme fixes 1/head
authorTobias Kunze <rixx@cutebit.de>
Mon, 2 Jan 2017 22:50:43 +0000 (23:50 +0100)
committerTobias Kunze <rixx@cutebit.de>
Mon, 2 Jan 2017 22:50:43 +0000 (23:50 +0100)
Adds: syntax highlighting, correct import (fints.client instead of
fints3.client) aswell as an added date import.

README.md

index 497a4563f05cecb47cac7764ed8e49515e8ef235..b1d5ec1c45b682611f6a6198ccc3c0acf8234ebe 100644 (file)
--- a/README.md
+++ b/README.md
@@ -21,28 +21,31 @@ Banks tested:
 Usage
 -----
 
-    import logging
-    from fints3.client import FinTS3PinTanClient
-
-    logging.basicConfig(level=logging.DEBUG)
-    f = FinTS3PinTanClient(
-        '123456789',  # Your bank's BLZ
-        'myusername',
-        'mypin',
-        'https://mybank.com/…'  # endpoint, e.g.: https://hbci-pintan.gad.de/cgi-bin/hbciservlet
-    )
-
-    accounts = f.get_sepa_accounts()
-    print(accounts)
-    # [SEPAAccount(iban='DE12345678901234567890', bic='ABCDEFGH1DEF', accountnumber='123456790', subaccount='',
-    #              blz='123456789')]
-
-    statement = f.get_statement(accounts[0], date(2016, 12, 1), date.today())
-    print([t.data for t in statement])
-    # The statement is a list of transaction objects as parsed by the mt940 parser, see
-    # https://mt940.readthedocs.io/en/latest/mt940.html#mt940.models.Transaction
-    # for documentation. Most information is contained in a dict accessible via their
-    # ``data`` property
+```python
+import logging
+from datetime import date
+from fints.client import FinTS3PinTanClient
+
+logging.basicConfig(level=logging.DEBUG)
+f = FinTS3PinTanClient(
+    '123456789',  # Your bank's BLZ
+    'myusername',
+    'mypin',
+    'https://mybank.com/…'  # endpoint, e.g.: https://hbci-pintan.gad.de/cgi-bin/hbciservlet
+)
+
+accounts = f.get_sepa_accounts()
+print(accounts)
+# [SEPAAccount(iban='DE12345678901234567890', bic='ABCDEFGH1DEF', accountnumber='123456790', subaccount='',
+#              blz='123456789')]
+
+statement = f.get_statement(accounts[0], date(2016, 12, 1), date.today())
+print([t.data for t in statement])
+# The statement is a list of transaction objects as parsed by the mt940 parser, see
+# https://mt940.readthedocs.io/en/latest/mt940.html#mt940.models.Transaction
+# for documentation. Most information is contained in a dict accessible via their
+# ``data`` property
+```
 
 Credits and License
 -------------------