google-cloud-spanner
Google Cloud Spanner API client library
Install
google-cloud-spanner on PyPI
pip
pip install google-cloud-spanneruv
uv add google-cloud-spannerpoetry
poetry add google-cloud-spannerPackage 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
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:
Select or create a Cloud Platform project._Enable billing for your project._Enable the Cloud Spanner._- `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.
Similar packages
permissive · top 1,000 on PyPI
ydbpermissive · top 1,000 on PyPI
redshift-connectorpermissive · top 1,000 on PyPI
pymssqlcopyleft · top 1,000 on PyPI
google-cloud-automlpermissive · top 1,000 on PyPI
google-cloud-datacatalogpermissive · top 1,000 on PyPI
google-cloud-firestorepermissive · top 1,000 on PyPI
sqlparsepermissive · top 1,000 on PyPI
pg8000permissive · top 1,000 on PyPI
pyrsistentpermissive · top 1,000 on PyPI