woob.capabilities.bank.base

class woob.capabilities.bank.base.Account(id='0', url=None)

Bases: woob.capabilities.bank.base.BaseAccount

Bank account.

Variables
  • type – (int) Type of account (default: 0)

  • owner_type – (str) Usage of account

  • balance – (Decimal) Balance on this bank account

  • coming – (Decimal) Sum of coming movements

  • iban – (str) International Bank Account Number

  • ownership – (str) Relationship between the credentials owner (PSU) and the account

  • paydate – (date, datetime) For credit cards. When next payment is due.

  • paymin – (Decimal) For credit cards. Minimal payment due.

  • cardlimit – (Decimal) For credit cards. Credit limit.

  • number – (str) Shown by the bank to identify your account ie XXXXX7489

  • valuation_diff – (Decimal) +/- values total

  • valuation_diff_ratio – (Decimal) +/- values ratio

  • company_name – (str) Name of the company of the stock - only for employee savings

  • parent – (BaseAccount) Parent account

  • opening_date – (date, datetime) Date when the account contract was created on the bank

TYPE_ARTICLE_83 = 11
TYPE_CAPITALISATION = 14
TYPE_CARD = 7
TYPE_CHECKING = 1
TYPE_CONSUMER_CREDIT = 18
TYPE_DEPOSIT = 3
TYPE_JOINT = 6
TYPE_LIFE_INSURANCE = 8
TYPE_LOAN = 4
TYPE_MADELIN = 16
TYPE_MARKET = 5
TYPE_MORTGAGE = 17
TYPE_PEA = 13
TYPE_PEE = 9
TYPE_PER = 20
TYPE_PERCO = 10
TYPE_PERP = 15
TYPE_REAL_ESTATE = 21
TYPE_REVOLVING_CREDIT = 19
TYPE_RSP = 12
TYPE_SAVINGS = 2
TYPE_UNKNOWN = 0
property valuation_diff_percent
exception woob.capabilities.bank.base.AccountNotFound(msg='Account not found')

Bases: woob.capabilities.bank.base.ObjectNotFound

Raised when an account is not found.

class woob.capabilities.bank.base.AccountOwnership

Bases: object

Relationship between the credentials owner (PSU) and the account

ATTORNEY = 'attorney'

The PSU is the account attorney

CO_OWNER = 'co-owner'

The PSU is the account co-owner

OWNER = 'owner'

The PSU is the account owner

class woob.capabilities.bank.base.AccountType(*args, **kwargs)

Bases: woob.capabilities.base.Enum

ARTICLE_83 = 11

Article 83

CAPITALISATION = 14

Life Insurance capitalisation

CARD = 7

Card account

CHECKING = 1

Transaction, everyday transactions

CONSUMER_CREDIT = 18

Consumer credit

DEPOSIT = 3

Term of Fixed Deposit, has time/amount constraints

JOINT = 6

Joint account

LIFE_INSURANCE = 8

Life insurances

LOAN = 4

Loan account

MADELIN = 16

Complementary retirement savings

MARKET = 5

Stock market or other variable investments

MORTGAGE = 17

Mortgage

PEA = 13

Share savings

PEE = 9

Employee savings PEE

PER = 20

Pension plan PER

PERCO = 10

Employee savings PERCO

PERP = 15

Retirement savings

REAL_ESTATE = 21

Real estate investment such as SCPI, OPCI, SCI

REVOLVING_CREDIT = 19

Revolving credit

RSP = 12

Employee savings RSP

SAVINGS = 2

Savings/Deposit, can be used for every banking

UNKNOWN = 0
class woob.capabilities.bank.base.BaseAccount(id='0', url=None)

Bases: woob.capabilities.base.BaseObject, woob.capabilities.base.Currency

Generic class aiming to be parent of Recipient and Account.

Variables
  • label – (str) Pretty label

  • currency – (str) Currency (default: None)

  • bank_name – (str) Bank Name

property ban

Bank Account Number part of IBAN

property currency_text
class woob.capabilities.bank.base.CapBank

Bases: woob.capabilities.collection.CapCollection

Capability of bank websites to see accounts and transactions.

get_account(id)

Get an account from its ID.

Parameters

id (str) – ID of the account

Return type

Account

Raises

AccountNotFound

iter_accounts()

Iter accounts.

Return type

iter[Account]

iter_coming(account)

Iter coming transactions on a specific account.

Parameters

account (Account) – account to get coming transactions

Return type

iter[Transaction]

Raises

AccountNotFound

iter_history(account)

Iter history of transactions on a specific account.

Parameters

account (Account) – account to get history

Return type

iter[Transaction]

Raises

AccountNotFound

iter_resources(objs, split_path)

Iter resources.

Default implementation of this method is to return on top-level all accounts (by calling iter_accounts()).

Parameters
  • objs (tuple[BaseObject]) – type of objects to get

  • split_path (list) – path to discover

Return type

iter[BaseObject]

class woob.capabilities.bank.base.Loan(id='0', url=None)

Bases: woob.capabilities.bank.base.Account

Account type dedicated to loans and credits.

Variables
  • name – (str) Person name

  • account_label – (str) Label of the debited account

  • insurance_label – (str) Label of the insurance

  • total_amount – (Decimal) Total amount loaned

  • available_amount – (Decimal) Amount available

  • used_amount – (Decimal) Amount already used

  • subscription_date – (date, datetime) Date of subscription of the loan

  • maturity_date – (date, datetime) Estimated end date of the loan

  • duration – (int, int) Duration of the loan given in months

  • rate – (Decimal) Monthly rate of the loan

  • nb_payments_left – (int, int) Number of payments still due

  • nb_payments_done – (int, int) Number of payments already done

  • nb_payments_total – (int, int) Number total of payments

  • last_payment_amount – (Decimal) Amount of the last payment done

  • last_payment_date – (date, datetime) Date of the last payment done

  • next_payment_amount – (Decimal) Amount of next payment

  • next_payment_date – (date, datetime) Date of the next payment

class woob.capabilities.bank.base.Transaction(id='', url=NotLoaded, backend=None)

Bases: woob.capabilities.base.BaseObject

Bank transaction.

Variables
  • date – (date, datetime) Debit date on the bank statement

  • rdate – (date, datetime) Real date, when the payment has been made; usually extracted from the label or from credit card info

  • vdate – (date, datetime) Value date, or accounting date; usually for professional accounts

  • bdate – (date, datetime) Bank date, when the transaction appear on website (usually extracted from column date)

  • type – (int) Type of transaction, use TYPE_* constants (default: 0)

  • raw – (str) Raw label of the transaction

  • category – (str) Category of the transaction

  • label – (str) Pretty label

  • amount – (Decimal) Net amount of the transaction, used to compute account balance

  • card – (str) Card number (if any)

  • commission – (Decimal) Commission part on the transaction (in account currency)

  • gross_amount – (Decimal) Amount of the transaction without the commission

  • original_amount – (Decimal) Original net amount (in another currency)

  • original_currency – (str) Currency of the original amount

  • country – (str) Country of transaction

  • original_commission – (Decimal) Original commission (in another currency)

  • original_commission_currency – (str) Currency of the original commission

  • original_gross_amount – (Decimal) Original gross amount (in another currency)

  • investments – (list) List of investments related to the transaction (default: [])

TYPE_BANK = 9
TYPE_CARD = 7
TYPE_CARD_SUMMARY = 11
TYPE_CASH_DEPOSIT = 10
TYPE_CHECK = 3
TYPE_DEFERRED_CARD = 12
TYPE_DEPOSIT = 4
TYPE_LOAN_PAYMENT = 8
TYPE_ORDER = 2
TYPE_PAYBACK = 5
TYPE_TRANSFER = 1
TYPE_UNKNOWN = 0
TYPE_WITHDRAWAL = 6
unique_id(seen=None, account_id=None)

Get an unique ID for the transaction based on date, amount and raw.

Parameters
  • seen (dict) – if given, the method uses this dictionary as a cache to prevent several transactions with the same values to have the same unique ID.

  • account_id (str) – if given, add the account ID in data used to create the unique ID. Can be useful if you want your ID to be unique across several accounts.

Returns

an unique ID encoded in 8 length hexadecimal string (for example 'a64e1bc9')

Return type

str