PyFoam.IPythonHelpers.PermanentStorage module

PermanentStorage

Store data permanently in the metadata of a notebook

class PyFoam.IPythonHelpers.PermanentStorage.PermanentStorage[source]

Bases: object

Access the stored values in the notebook

To make sure that only one object is created (so that multiple objects can’t interfer) it is created as a singleton. See: A python singleton: http://code.activestate.com/recipes/52558/

_PermanentStorage__instance = None
_PermanentStorage__permanentStorage

alias of __permanentStorage

__call__(...) <==> x(...)[source]
__contains__(key)[source]

Is property in the metadata

__delitem__(attr)[source]

Delete property from the metadata

__dict__ = dict_proxy({'__delitem__': <function __delitem__>, '__module__': 'PyFoam.IPythonHelpers.PermanentStorage', '__setitem__': <function __setitem__>, '_PermanentStorage__permanentStorage': <class 'PyFoam.IPythonHelpers.PermanentStorage.__permanentStorage'>, '__getitem__': <function __getitem__>, '__contains__': <function __contains__>, '__setattr__': <function __setattr__>, '_PermanentStorage__instance': None, '__dict__': <attribute '__dict__' of 'PermanentStorage' objects>, '__iter__': <function __iter__>, '__getattr__': <function __getattr__>, '__call__': <function __call__>, '_data': {}, '__weakref__': <attribute '__weakref__' of 'PermanentStorage' objects>, '__doc__': "Access the stored values in the notebook\n\n To make sure that only one object is created (so that multiple objects\n can't interfer) it is created as a singleton. See:\n A python singleton: http://code.activestate.com/recipes/52558/", '__init__': <function __init__>})
__getattr__(attr)[source]

Delegate access to implementation

__getitem__(attr)[source]

Get property from the metadata

__init__()[source]

Create the singleon

__iter__()[source]

Iterate over properties of the metadata

__module__ = 'PyFoam.IPythonHelpers.PermanentStorage'
__setattr__(attr, value)[source]

Delegate access to implementation

__setitem__(attr, value)[source]

Set property in the metadata

__weakref__

list of weak references to the object (if defined)

_data = {}