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.__permanentStorage

__call__(name, f, call=True)[source]

Call self as a function.

__contains__(key)[source]

Is property in the metadata

__delitem__(attr)[source]

Delete property from the metadata

__dict__ = mappingproxy({'__module__': 'PyFoam.IPythonHelpers.PermanentStorage', '__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/", '_data': {}, '_PermanentStorage__permanentStorage': <class 'PyFoam.IPythonHelpers.PermanentStorage.PermanentStorage.__permanentStorage'>, '_PermanentStorage__instance': None, '__init__': <function PermanentStorage.__init__>, '__getattr__': <function PermanentStorage.__getattr__>, '__setattr__': <function PermanentStorage.__setattr__>, '__getitem__': <function PermanentStorage.__getitem__>, '__delitem__': <function PermanentStorage.__delitem__>, '__iter__': <function PermanentStorage.__iter__>, '__contains__': <function PermanentStorage.__contains__>, '__setitem__': <function PermanentStorage.__setitem__>, '__call__': <function PermanentStorage.__call__>, '__dict__': <attribute '__dict__' of 'PermanentStorage' objects>, '__weakref__': <attribute '__weakref__' of 'PermanentStorage' objects>})
__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 = {}