Pyblish By Example


We've briefly touched upon the fact that Context and Instance objects can store and retrieve data.
import pyblish.api
context = pyblish.api.Context()["key"] = "value"
Data is a regular Python dictionary stored in the Context and is meant for sharing information amongst plug-ins, whereas data in an Instance is specific to the instance. In both cases, data uses mixedCase by convention, whereas standard Python variables use snake_case.
# wrong["my_key"] = True
# right["myKey"] = True
Last modified 2yr ago