API Documentation¶
-
class
nukedatastore.NukeDataStoreError(message)[source]¶ Exception indicating an error related to the Nuke Data Store, inherits from
ValueError.
-
class
nukedatastore.NukeDataStore(name)[source]¶ NukeDataStore class, wrapper around Nuke’s NoOp node.
Parameters: name (str) – Data store name Usage:
>>> from nukedatastore import NukeDataStore >>> ds = NukeDataStore('data_store') >>> ds['project_data'] = {'id': 1234, 'name': 'project name'} >>> print ds['project_data'] >>> {'id': 1234, 'name': 'project name'}
-
freeze()[source]¶ Freeze the data in the
NukeDataStoreand make it unchangeable.
-
is_frozen()[source]¶ Return whether the data in the
NukeDataStoreis frozen and therefore unchangeable.
-
list()[source]¶ List all available keys in the
NukeDataStore.
-
store¶ Return the data store’s Nuke node
Returns: Data store node Return type: Node
-
unfreeze()[source]¶ Unfreeze the data in the
NukeDataStoreand make it changeable.
-
-
class
nukedatastore.NukeAPICache(name)[source]¶ NukeAPICache class, inherits from
NukeDataStore.Parameters: name (str) – Data store name Usage:
>>> from nukedatastore import NukeAPICache >>> api_cache = NukeAPICache('api_cache') >>> api_cache.register('project_data', 'https://project.your.domain.com/api') >>> print api_cache['project_data'] >>> {'id': 1234, 'name': 'project name'}
-
diff(*args)[source]¶ Given *args, diff specified APIs, if no APIs are specified, diff all registered APIs.
Parameters: *args (str) – API names Returns: Diff Return type: dict
-
register(name, url, update=True, ignore_exists=True)[source]¶ Given a
nameand aurl, register a new API in the cache.Parameters:
-