csb43.homebank
¶
Note
license: GNU Lesser General Public License v3.0 (see LICENSE)
Homebank CSV format
-
class
csb43.homebank.
Transaction
(record=None)¶ Hombebank CSV transaction
Creating a record:
>>> from csb43.homebank import Transaction >>> t = Transaction() >>> t.amount = 12.45 >>> import datetime >>> t.date = datetime.date(year=2013, month=3, day=19) >>> print(t) 19-03-13;;;;;12.45;
Parsing a record:
>>> t = Transaction("19-03-13;;;;;12.45;") >>> t.amount Decimal('12.45') >>> t.date datetime.date(2013, 3, 19)
-
amount
¶ amount of the transaction
-
category
¶ transaction category, according to HomeBank
-
date
¶ date of transaction (
datetime.datetime
)
-
description
¶ description of the transaction
-
info
¶ transaction’s info
-
mode
¶ mode of transaction
-
payee
¶ payee of the transaction
-
class
csb43.homebank.
Transaction
(record=None) Hombebank CSV transaction
Creating a record:
>>> from csb43.homebank import Transaction >>> t = Transaction() >>> t.amount = 12.45 >>> import datetime >>> t.date = datetime.date(year=2013, month=3, day=19) >>> print(t) 19-03-13;;;;;12.45;
Parsing a record:
>>> t = Transaction("19-03-13;;;;;12.45;") >>> t.amount Decimal('12.45') >>> t.date datetime.date(2013, 3, 19)
-
__init__
(record=None)¶ Parameters: record ( str
) – a Hombeank csv recordRaises: csb43.utils.Csb43Exception
-
__weakref__
¶ list of weak references to the object (if defined)
-
amount
amount of the transaction
-
category
transaction category, according to HomeBank
-
date
date of transaction (
datetime.datetime
)
-
description
description of the transaction
-
info
transaction’s info
-
mode
mode of transaction
-
payee
payee of the transaction
Converter¶
-
csb43.homebank.converter.
convertFromCsb
(csb)¶ Convert a CSB43 file into a HomeBank CSV file
Parameters: csb ( csb43.csb43.File
) – a CSB43 fileReturn type: list
ofTransaction
>>> # Homebank >>> from csb43 import csb43 >>> # >>> csbFile = csb43.File(open("movimientos.csb"), strict=False) >>> # >>> # print to stdout >>> for line in convertFromCsb(csbFile): ... print(line) ...
-
converter.
PAYMODES
= {'12': '5', '02': '2', '01': '2', '04': '3'}¶