flask_waffleconf.store¶
-
class
flask_waffleconf.store.AlchemyWaffleStore(db=None, model=None)¶ Bases:
flask_waffleconf.store.WaffleStoreConfig store for SQLAlchemy.
-
commit()¶
-
delete(key)¶
-
get(key)¶
-
put(key, value)¶
-
-
class
flask_waffleconf.store.PeeweeWaffleStore(db=None, model=None)¶ Bases:
flask_waffleconf.store.WaffleStoreConfig store for peewee.
-
commit()¶
-
delete(key)¶
-
get(key)¶
-
put(key, value)¶
-
-
class
flask_waffleconf.store.WaffleStore(db=None, model=None)¶ Bases:
objectObject for connecting to the application database.
Offers common methods that have to be overriden depending on the database type / ORM used.
Parameters: - db – Database instance.
- model – Model to work with.
-
commit()¶ Commit to database where needed.
-
delete(key)¶ Remove a configuration variable from the database.
Parameters: key (str) – Name of the configuration variable to delete. Returns: Deleted record or Noneif it could not be deleted.
-
get(key)¶ Obtain a configuration variable from the database.
Parameters: key (str) – Name of the configuration variable to obtain. Returns: Record or Noneif record could not be obtained.
-
put(key, value)¶ Insert / Update a configuration variable in the database.
Parameters: - key (str) – Name of the configuration variable that is being updated.
- value – Value to store in the database (serialized).
Returns: Updated record or
Noneon error.