Skip to main content

A library for basic data persistence in Nuke

Project description

https://img.shields.io/pypi/l/nukedatastore.svg https://img.shields.io/pypi/pyversions/nukedatastore.svg https://img.shields.io/pypi/v/nukedatastore.svg https://img.shields.io/pypi/wheel/nukedatastore.svg https://readthedocs.org/projects/nukedatastore/badge/?version=latest

A library for basic data persistence in Nuke

Full Documentation

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

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()

NukeAPICache

Working with the NukeAPICache is very similar. To register an API, type:

api_cache = nukedatastore.NukeAPICache('api_cache')
api.cache.register('project_data', 'https://project.your.domain.com')

To read the cached API data, type:

api_cache['project_data']

To update the API data, type:

api_cache.update('project_data')

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.2.tar.gz (14.8 kB view details)

Uploaded Source

Built Distribution

nukedatastore-0.1.2-py2-none-any.whl (7.8 kB view details)

Uploaded Python 2

File details

Details for the file nukedatastore-0.1.2.tar.gz.

File metadata

File hashes

Hashes for nukedatastore-0.1.2.tar.gz
Algorithm Hash digest
SHA256 2015d3de7d07546eac4649e2e3b0abd227313687d3a43456b4c1d900e1d9ba83
MD5 6c6f88c7db777a9c73f415e5caf23f82
BLAKE2b-256 8a510487a2e67e208bba4e3ebe1ddff5d8250e9b464c5faa2d9d5330c9357263

See more details on using hashes here.

File details

Details for the file nukedatastore-0.1.2-py2-none-any.whl.

File metadata

File hashes

Hashes for nukedatastore-0.1.2-py2-none-any.whl
Algorithm Hash digest
SHA256 1cfafe5366b92c25cace34809e6cf8d3df704a82f4ae0e9cc3a81a2c8edf9d0a
MD5 db9e55cb916cfdbc2c44d1fd21471c08
BLAKE2b-256 79a17d716ce679f5e8677c0007d4dc6d5510a75b3bfa34ce6a5d0a4414df5fc0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page