Skip to content

Commit 9d16a5c

Browse files
committed
add warning for session_data being ephemeral to docs
1 parent e27a722 commit 9d16a5c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

python/binaryview.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2388,7 +2388,7 @@ def _unregister(cls, view: core.BNBinaryView) -> None:
23882388
@staticmethod
23892389
def set_default_session_data(name: str, value: str) -> None:
23902390
"""
2391-
``set_default_session_data`` saves a variable to the BinaryView.
2391+
``set_default_session_data`` saves a variable to the BinaryView. Session data is ephemeral not saved to a database. Consider using :py:func:`store_metadata` if permanence is needed.
23922392
23932393
:param str name: name of the variable to be saved
23942394
:param str value: value of the variable to be saved
@@ -2873,7 +2873,7 @@ def allocated_ranges(self) -> List['variable.AddressRange']:
28732873

28742874
@property
28752875
def session_data(self): # TODO add type hint
2876-
"""Dictionary object where plugins can store arbitrary data associated with the view"""
2876+
"""Dictionary object where plugins can store arbitrary data associated with the view. This data is ephemeral and not saved to a database. Consider using :py:func:`store_metadata` if permanence is needed."""
28772877
handle = ctypes.cast(self.handle, ctypes.c_void_p)
28782878
if handle.value not in BinaryView._associated_data:
28792879
obj = _BinaryViewAssociatedDataStore()

0 commit comments

Comments
 (0)