A library for basic data persistance in Nuke
Project description
A library for basic data persistence in Nuke
Installation
To install nukedatastore, type:
$ pip install nukedatastore
Open Nuke’s init.py file and add:
nuke.pluginAddPath('/path/to/your/local/python/site-packages')
Getting Started
To get started with nukedatastore, type in the Nuke Script Editor:
import nukedatastore
To initialise a NukeDataStore, type:
ds = nukedatastore.NukeDataStore('data_store')
To store data in the NukeDataStore, type:
ds['project_data'] = {'id': 1234, 'name': 'project name'}
To list all available keys in the NukeDataStore, type:
ds.list()
# ['project_data']
To retrieve stored data from the NukeDataStore, type:
ds['project_data']
# {'id': 1234, 'name': 'project name'}
A NukeDataStore can be frozen, to freeze, type:
ds.freeze()
Any further attempt to set data on the NukeDataStore will result in an error:
ds['color_data'] = {'id': 'AB-123', 'name': 'White'}
# nukedatastore.NukeDataStoreError: Cannot mutate frozen NukeDataStore
To un-freeze, type:
ds.unfreeze()
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
nukedatastore-0.1.0.tar.gz
(12.8 kB
view hashes)
Built Distribution
Close
Hashes for nukedatastore-0.1.0-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 973300bb72e28221b9ed366aca7fb44565cc46c3977242e1bc441c56a6cb7128 |
|
MD5 | 6df1e52ff00c325cd88929ea92fd278f |
|
BLAKE2b-256 | 6fed2a16715da5a29e6ba0b8e929e3db552823955c0e74938fa5745b51cc2d74 |