Module session (3.55.0)

Wrapper for Cloud Spanner Session objects.

Classes

Session

Session(database,labels=None,database_role=None,is_multiplexed=False)

Representation of a Cloud Spanner Session.

We can use aSession to:

  • create the session
  • Useexists to check for the existence of the session
  • drop the session
Parameters
NameDescription
databaseDatabase

The database to which the session is bound.

labelsdict (str -> str)

(Optional) User-assigned labels for the session.

database_rolestr

(Optional) user-assigned database_role for the session.

is_multiplexedbool

(Optional) whether this session is a multiplexed session.

Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.

Last updated 2025-07-18 UTC.