Pyblish By Example
1.8
1.8
  • Introduction
  • Hello World
  • Quickstart
  • Files
  • Coordination
  • Architecture
  • Branching I
  • Branching II
  • Branching III
  • Sharing
  • Validating I
  • Validating II
  • CVEI I
  • CVEI II
  • CVEI III
  • CVEI IV
  • Data
  • Report I
  • Report II
  • Report III
  • Report IV
  • Report V
  • Callback I
  • Callback II
  • Callback III
  • Logging
  • Filtering
  • Next Steps
Powered by GitBook
On this page

Was this helpful?

Data

We've briefly touched upon the fact that Context and Instance objects can store and retrieve data.

import pyblish.api
context = pyblish.api.Context()
context.data["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
context.data["my_key"] = True

# right
context.data["myKey"] = True
PreviousCVEI IVNextReport I

Last updated 5 years ago

Was this helpful?