skillfed

google-cloud-spanner

Google Cloud Spanner API client library

google-cloud-spanner Permissive license Apache-2.0 Active 5,370 v3.69.1 released

Install

google-cloud-spanner on PyPI

pip

pip install google-cloud-spanner

uv

uv add google-cloud-spanner

poetry

poetry add google-cloud-spanner

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 15 — google-api-core, google-auth, google-cloud-core, grpcio, grpc-google-iam-v1, proto-plus, protobuf, grpc-interceptor, sqlparse, opentelemetry-api, opentelemetry-sdk, opentelemetry-semantic-conventions, opentelemetry-resourcedetector-gcp, google-cloud-monitoring, mmh3
Maintenance actively maintained — 7 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: google_cloud_spanner-3.69.1-py3-none-any.whl

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: Apache Software LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Internet

About google-cloud-spanner

from the package's own PyPI description — quoted content, verbatim

Python Client for Cloud Spanner

|stable| |pypi| |versions|

Cloud Spanner_: Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.

  • Client Library Documentation_
  • Product Documentation_

.. |stable| image:: https://img.shields.io/badge/support-stable-gold.svg :target: https://github.com/googleapis/google-cloud-python/blob/main/README.rst#stability-levels .. |pypi| image:: https://img.shields.io/pypi/v/google-cloud-spanner.svg :target: https://pypi.org/project/google-cloud-spanner/ .. |versions| image:: https://img.shields.io/pypi/pyversions/google-cloud-spanner.svg :target: https://pypi.org/project/google-cloud-spanner/ .. _Cloud Spanner: https://cloud.google.com/spanner/ .. _Client Library Documentation: https://cloud.google.com/python/docs/reference/spanner/latest/summary_overview .. _Product Documentation: https://cloud.google.com/spanner/

Quick Start

In order to use this library, you first need to go through the following steps:

  1. Select or create a Cloud Platform project._
  2. Enable billing for your project._
  3. Enable the Cloud Spanner._
  4. `Set...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Python client library for Google Cloud Spanner, a managed globally-consistent relational database service, enabling transaction-based SQL queries, DML operations, and mutations through a PEP-249 connection API.

Low friction: pure-wheel distribution with 15 runtime dependencies. Active maintenance with release 7 days ago signals strong ongoing support.

Apache-2.0 permissive license allows commercial and private use with minimal restrictions; you must include a copy of the license and state significant changes, but derivative works and redistribution are permitted.

Usage

pip install google-cloud-spanner

from google.cloud import spanner

client = spanner.Client()
instance = client.instance('instance-id')
database = instance.database('database-id')

def callback(transaction):
    result = transaction.execute_sql('SELECT * FROM table')
    for row in result:
        print(row)

database.run_in_transaction(callback)

Requires Python >= 3.10; Google Cloud credentials must be configured (via GOOGLE_APPLICATION_CREDENTIALS or Application Default Credentials) and Cloud Spanner API must be enabled on your GCP project.

Verdict: Production-ready, actively maintained client library for Cloud Spanner with no known vulnerabilities and permissive licensing. Suitable for applications requiring globally-consistent relational database access on GCP, provided you have the necessary cloud project setup and authentication in place.

Needs verification

  • Whether the 15 runtime dependencies introduce any transitive vulnerabilities or licensing conflicts not surfaced by the subject package's own OSV record.
  • Performance characteristics and connection pooling behavior under high concurrency relative to alternative database clients.
  • Repository star count and its relevance to maintenance signal beyond the 7-day release cadence.
google cloud spanner python clientmanaged relational database apicloud spanner transactions sqlgoogle cloud database pythonspanner dml mutations insert updatepep-249 database connectionglobally consistent database service

Similar packages