IPython 8.4.0 Pypi GitHub Homepage
Other Docs
store(self, parameter_s='')

Example:

In [1]: l = ['hello',10,'world']
In [2]: %store l
Stored 'l' (list)
In [3]: exit

(IPython session is closed and started again...)

ville@badger:~$ ipython
In [1]: l
NameError: name 'l' is not defined
In [2]: %store -r
In [3]: l
Out[3]: ['hello', 10, 'world']

Usage:

It should be noted that if you change the value of a variable, you need to %store it again if you want to persist the new value.

Note also that the variables will need to be pickleable; most basic python types can be safely %store'd.

Also aliases can be %store'd across sessions. To remove an alias from the storage, use the %unalias magic.

Lightweight persistence for python variables.

Examples

See :

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /IPython/extensions/storemagic.py#78
type: <class 'function'>
Commit: