class _AppCtxGlobals: (source)
A plain object. Used as a namespace for storing data during an application context. Creating an app context automatically creates this object, which is made available as the :data:`g` proxy. .. describe:: 'key' in g Check whether an attribute is present. .. versionadded:: 0.10 .. describe:: iter(g) Return an iterator over the attribute names. .. versionadded:: 0.10
Method | __contains__ |
Undocumented |
Method | __delattr__ |
Undocumented |
Method | __getattr__ |
Undocumented |
Method | __iter__ |
Undocumented |
Method | __repr__ |
Undocumented |
Method | __setattr__ |
Undocumented |
Method | get |
Get an attribute by name, or a default value. Like :meth:`dict.get`. |
Method | pop |
Get and remove an attribute by name. Like :meth:`dict.pop`. |
Method | setdefault |
Get the value of an attribute if it is present, otherwise set and return a default value. Like :meth:`dict.setdefault`. |
Get an attribute by name, or a default value. Like :meth:`dict.get`. :param name: Name of attribute to get. :param default: Value to return if the attribute is not present. .. versionadded:: 0.10
Get and remove an attribute by name. Like :meth:`dict.pop`. :param name: Name of attribute to pop. :param default: Value to return if the attribute is not present, instead of raising a ``KeyError``. .. versionadded:: 0.11