Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
weboob
weboob
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
    • Cycle Analytics
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Charts
  • Issues 177
    • Issues 177
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 49
    • Merge Requests 49
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
    • Charts
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Charts
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • weboob
  • weboobweboob
  • Wiki
  • weboob lib

weboob lib

Last edited by ntome Mar 25, 2018
Page history

For more control on the weboob use, it can be used as a Python library.

A Weboob instance is used to load backends implementing a capability (as a command like boobank does). It's also used to query the weboob modules. A backend is simply an instance of a class implementing a capability.

To load backends implementing CapBank:

from weboob.core import Weboob
from weboob.capabilities.bank import CapBank

w = Weboob()
w.load_backends(CapBank)

It's then possible to query a particular backend directly, for example the iter_accounts method will return Account instances:

total = 0
for acc in w['bnporc'].iter_accounts():
    total += acc.balance
print('Total for bnporc:', balance)

It's also possible to aggregate from all backends:

total = 0
for acc in w.iter_accounts():
    total += acc.balance
print('Total for all backends:', balance)
Clone repository
  • bank model
  • boobathon 201804
  • boobathon 201911
  • cli tools shell
  • cli tools
  • config files
  • draft maintainer setup
  • faq
  • fr
    • guide scraping
    • guide weboob
  • Home
  • installing weboob on synology (debian chroot method)
  • installing weboob on synology (opkg method)
  • lecture 2010 07 09
  • lecture 2012 12 29
More Pages