nukedatastore
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
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')
To diff existing API data with new API data, type:
api_cache.diff('project_data')
# {'project_data': {'values_changed': {"root['headers']['X-Request-Id']": {'new_value': u'f5800c5e-4edb-4509-8339-4bcdf0b32732', 'old_value': u'd8ed6737-e5c8-49aa-b42e-58eb2ba472b9'}}}}
Metadata
Release files for nukedatastore 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| nukedatastore-0.2.0.tar.gz | 15.2 kB | Without provenance | Details for nukedatastore-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| nukedatastore-0.2.0-py2-none-any.whl | Python 2 | none | any | Details for nukedatastore-0.2.0-py2-none-any.whl |
Total release size: 23.6 kB
Release files / nukedatastore-0.2.0.tar.gz
| Download URL | nukedatastore-0.2.0.tar.gz |
|---|---|
| Size | 15.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
7f8a2880053539435b14faebc8a79aa6a963d1c3837976de3163d7c58ca3c978
|
|
BLAKE2b-256 checksum How to use checksums |
b93bcea067ff167bef453c36f7bcf6f68eef19eabf5384cf8963d36638b14166
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / nukedatastore-0.2.0-py2-none-any.whl
| Download URL | nukedatastore-0.2.0-py2-none-any.whl |
|---|---|
| Size | 8.4 kB |
| Tags | Python 2 |
|
SHA-256 checksum How to use checksums |
d10f0f93cbce34e429e198d0d75471feb08ad3d20c4472d97eddeb522e8ba9b8
|
|
BLAKE2b-256 checksum How to use checksums |
12ea2eaa96893ad6c99cff19b02d19479b43526112deb2dfd9678222b2b1b0ee
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for nukedatastore 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.