ReadHookContext

ReadHookContext#

class brainstate.ReadHookContext(operation, state_ref, timestamp=time(), metadata=dict(), value=None)[source]#

Context for read hooks.

This context is passed to hooks registered for ‘read’ operations. Read hooks can inspect the value but should not modify it.

value#

The current value being read from the state

Type:

Any