WriteHookContext#

class brainstate.WriteHookContext(operation, state_ref, timestamp=<factory>, metadata=<factory>, value=None, old_value=None)[source]#

Base context for write operations.

This context provides information about both the new value being written and the previous value that will be replaced.

value#

The new value being written to the state

old_value#

The previous value before the write operation