Session: Storing Entities

To store entities inside the session object, use the store method.


Stores the entity in a session, then extracts the ID from the entity or if not available generates a new one.

def store(self, entity: object, key: Optional[str] = None, change_vector: Optional[str] = None) -> None:
entity object Entity that will be stored
change_vector str Entity change vector, used for concurrency checks (None to skip check)
key str Entity will be stored under this ID, (None to generate automatically)

Example"John", last_name="Doe"))

# send all pending operations to server, in this case only 'Put' operation