weboob.tools.value

class weboob.tools.value.ValuesDict(*values)

Bases: collections.OrderedDict

Ordered dictionarry which can take values in constructor.

>>> ValuesDict(Value('a', label='Test'), ValueInt('b', label='Test2'))
class weboob.tools.value.Value(*args, **kwargs)

Bases: object

Value.

Parameters:
  • label (str) – human readable description of a value
  • required (bool) – if True, the backend can’t load if the key isn’t found in its configuration
  • default – an optional default value, used when the key is not in config. If there is no default value and the key is not found in configuration, the required parameter is implicitly set
  • masked (bool) – if True, the value is masked. It is useful for applications to know if this key is a password
  • regexp (str) – if specified, on load the specified value is checked against this regexp, and an error is raised if it doesn’t match
  • choices ((list,dict)) – if this parameter is set, the value must be in the list
  • tiny – the value of choices can be entered by an user (as they are small)
check_valid(v)

Check if the given value is valid.

Raises:ValueError
dump()

Dump value to be stored.

get()

Get the value.

is_command(v)

Test if a value begin with ` and end with ` (command is used to call external programms)

load(domain, v, requests)

Load value.

Parameters:
  • domain (str) – what is the domain of this value
  • v – value to load
  • requests (weboob.core.requests.Requests) – list of weboob requests
set(v)

Set a value.

show_value(v)
class weboob.tools.value.ValueBackendPassword(*args, **kwargs)

Bases: weboob.tools.value.Value

check_valid(passwd)
dump()
get()
load(domain, password, requests)
set(passwd)
class weboob.tools.value.ValueInt(*args, **kwargs)

Bases: weboob.tools.value.Value

get()
class weboob.tools.value.ValueFloat(*args, **kwargs)

Bases: weboob.tools.value.Value

check_valid(v)
get()
class weboob.tools.value.ValueBool(*args, **kwargs)

Bases: weboob.tools.value.Value

check_valid(v)
get()