apicrud.account_settings

account_settings.py

Access class for account settings, with cache

Each account is associated with an entry in the Settings model; this class provides access to these key-value pairs as read-only attributes. Because these functions are called frequently, the db entry is loaded into memory for a configurable expiration period (config.REDIS_TTL).

created 13-may-2019 by richb@instantlinux.net

Classes

AccountSettings(account_id[, db_session, uid])

Account Settings - converts db record to object attributes.

class apicrud.account_settings.AccountSettings(account_id, db_session=None, uid=None)

Account Settings - converts db record to object attributes.

Parameters
  • account_id (str) – ID in database of a user’s account

  • db_session (obj) – a session connected to datbase

  • uid (str) – User ID