woob.capabilities.account

exception AccountRegisterError[source]

Bases: UserError

Raised when there is an error during registration.

class Account(id: str = None, url: str = None)[source]

Bases: BaseObject

Describe an account and its properties.

Variables
  • url – (str) url

  • login – (str) Login

  • password – (str) Password

  • properties – (dict) List of key/value properties

class StatusField(key: str, label: str, value: str, flags: Optional[int] = 0, url: Optional[str] = None)[source]

Bases: BaseObject

Field of an account staeobjectus.

Variables
  • url – (str) url

  • key – (str) Key

  • label – (str) Label

  • value – (str) Value

  • flags – (int) Flags

FIELD_TEXT = 1
FIELD_HTML = 2
class CapAccount[source]

Bases: Capability

Capability for websites when you can create and manage accounts.

Variables

ACCOUNT_REGISTER_PROPERTIES – This class constant may be a list of woob.tools.value.Value objects. If the value remains None, woob considers that register_account() isn’t supported.

ACCOUNT_REGISTER_PROPERTIES = None
static register_account(account: Account)[source]

Register an account on website

This is a static method, it would be called even if the backend is instancied.

Parameters

account (Account) – describe the account to create

Raises

AccountRegisterError

confirm_account(mail: str)[source]

From an email go to the confirm link.

get_account() Account[source]

Get the current account.

update_account(account: Account)[source]

Update the current account.

get_account_status() List[StatusField][source]

Get status of the current account.

Returns

a list of fields

Return type

list[StatusField]

class CapCredentialsCheck[source]

Bases: Capability

check_credentials() bool[source]

Its purpose is to check that the credentials (in the config) are valid for the module’s website, API, whatever requires credentials to be accessed.