shared
cauldron.shared
Type: 
SharedCache
A container that holds all of the variables shared between notebooks
def
clear

Clears all of the variables currently stored in this cache

info_outline
This function takes no arguments
def
fetch

Retrieves the value of the specified variable from the cache

Arguments
Required
Optional
key

str, NoneType

The name of the variable for which the value should be returned

default_value

Any

The value to return if the variable does not exist in the cache

Default Value: 

None

Returns

The value of the specified key if it exists in the cache or the default_Value if it does not

def
grab

Returns a tuple containing multiple values from the cache specified by the keys arguments

Arguments
Required
Optional
keys

str

One or more variable names stored in the cache that should be returned by the grab function. The order of these arguments are preserved by the returned tuple.

default_value

Any

If one or more of the keys is not found within the cache, this value will be returned as the missing value.

Returns

typing.Tuple

A tuple containing values for each of the keys specified in the arguments

def
put

Adds one or more variables to the cache.

Arguments
Required
Optional
args

Any

Variables can be specified by two consecutive arguments where the first argument is a key and the second one the corresponding value. For example:

put('a', 1, 'b', False)

would add two variables to the cache where the value of a would be 1 and the value of b would be False.

kwargs

Any

Keyword arguments to be added to the cache, which are name value pairs like standard keyword named arguments in Python. For example:

put(a=1, b=False)

would add two variables to the cache where the value of a would be 1 and the value of b would be False.