Module client (1.10.0)

Parent client for calling the Cloud Spanner API.

This is the base from which all interactions with the API occur.

In the hierarchy of API concepts

Classes

Client

Client(project=None, credentials=None, client_info=<google.api_core.gapic_v1.client_info.ClientInfo object>, user_agent=None)

Client for interacting with Cloud Spanner API.

Parameters
NameDescription
project str or unicode

(Optional) The ID of the project which owns the instances, tables and data. If not provided, will attempt to determine from the environment.

credentials OAuth2Credentials or :data:NoneType

(Optional) The OAuth2 Credentials to use for this client. If not provided, defaults to the Google Application Default Credentials.

client_info google.api_core.gapic_v1.client_info.ClientInfo

(Optional) The client info used to send a user-agent string along with API requests. If None, then default info will be used. Generally, you only need to set this if you're developing your own library or partner tool.

user_agent str

(Deprecated) The user agent to be used with API request. Not used.

Exceptions
TypeDescription
`ValueErro

InstanceConfig

InstanceConfig(name, display_name)

Named configurations for Spanner instances.

Parameters
NameDescription
name str

ID of the instance configuration

display_name str

Name of the instance configuration