$npx skillfedfor your agent

cloud-sql-python-connector

Google Cloud SQL Python Connector library

Worth itPyPI DatabaseReleased Jul 20268.0M downloads / moApache-2.0Pure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — cloud_sql_python_connector-1.21.0-py3-none-any.whl
v1.21.0 · released 2026-07-24 · Python >=3.9 · 8 runtime deps: aiohttp, cryptography, dnspython, Requests, google-auth, grpcio, protobuf, googleapis-common-protos

Yes. This is the official, actively maintained connector for Python applications accessing Cloud SQL on Google Cloud. It eliminates certificate management and IP allowlisting overhead while providing IAM-based security. Install it if you are running Python on Google Cloud and need Cloud SQL connectivity.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires IAM principal with Cloud SQL Client role and Cloud SQL Admin API enabled in your Google Cloud Project; uses Application Default Credentials for authentication.
  • Low friction install with a pure-Python wheel.
  • Actively maintained with a recent release (21 days old) and a stable codebase (344 stars, last commit 2026-08-13).

License · maintenance · safety

Apache-2.0 (permissive) — Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

last release 2026-07-24 (21 days) · last repo commit 2026-08-13 · 344 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 7,971,363 downloads/mo, #1,677 on PyPI

Verify before relying

pip install "cloud-sql-python-connector[pymysql]"

from google.cloud.sql.connector import Connector

connector = Connector()
conn = connector.connect(
    "project:region:instance",
    "pymysql",
    user="my-user",
    password="my-password",
    db="my-db-name"
)
connector.close()
  • Performance characteristics and connection overhead compared to direct SSL certificate management
  • Support for connection pooling libraries beyond those mentioned in the description
  • Behavior and latency in environments with intermittent network connectivity
Same gist for agents: .md · .json

What it is and what it does

The Cloud SQL Python Connector is a Google-maintained library that handles secure, IAM-authenticated connections to Cloud SQL instances without requiring SSL certificates or IP allowlisting. It wraps database drivers (pymysql, pg8000, asyncpg, pytds), intercepting connection requests to establish encrypted TLS 1.3 tunnels through Google's infrastructure using your application's IAM credentials.

The connector is designed to work alongside connection pooling libraries to manage connection reuse and reduce overhead. It supports both eager (background refresh) and lazy refresh strategies for credential management, making it suitable for serverless environments like Cloud Run and Cloud Functions where CPU throttling occurs outside request contexts. You initialize a Connector object, call its connect method with your instance details, and the library handles all authentication and encryption transparently.

Use it for

  • Connect Python applications on Cloud Run or Cloud Functions to Cloud SQL without managing certificates or firewall rules
  • Migrate from Cloud SQL Auth Proxy to a native Python solution with IAM-based access control
  • Build multi-tenant applications where each tenant's database access is controlled via IAM roles
  • Use IAM database authentication to avoid storing database passwords in application code or secrets
  • Establish encrypted connections to Cloud SQL from on-premises or hybrid environments using service account credentials

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

This is the official, actively maintained connector for Python applications accessing Cloud SQL on Google Cloud. It eliminates certificate management and IP allowlisting overhead while providing IAM-based security. Install it if you are running Python on Google Cloud and need Cloud SQL connectivity.

Install

cloud-sql-python-connector on PyPI

Before you install

Low friction install with a pure-Python wheel. Actively maintained with a recent release (21 days old) and a stable codebase (344 stars, last commit 2026-08-13). Eight runtime dependencies are all well-established libraries.

Requires IAM principal with Cloud SQL Client role and Cloud SQL Admin API enabled in your Google Cloud Project; uses Application Default Credentials for authentication.

License in practice

Apache-2.0 permissive license allows commercial and private use with minimal restrictions.

Quickstart

pip install "cloud-sql-python-connector[pymysql]"

from google.cloud.sql.connector import Connector

connector = Connector()
conn = connector.connect(
    "project:region:instance",
    "pymysql",
    user="my-user",
    password="my-password",
    db="my-db-name"
)
connector.close()

Verify before relying

  • Performance characteristics and connection overhead compared to direct SSL certificate management
  • Support for connection pooling libraries beyond those mentioned in the description
  • Behavior and latency in environments with intermittent network connectivity

Package facts

LicenseApache-2.0 permissive
Python supportSupports the current Python release >=3.9
Install frictionLow. Pure-Python wheel
Runtime dependencies
8 packages
aiohttpcryptographydnspythonRequestsgoogle-authgrpcioprotobufgoogleapis-common-protos
MaintenanceActively maintained 21 days since the last release
Last repo commit
First released
Downloads7,971,363 / month, #1,677 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating 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.9

Evidence: cloud_sql_python_connector-1.21.0-py3-none-any.whl

Tags

Capabilities
cloud sql python connectorgoogle cloud sql authenticationiam database connectionscloud sql tls encryptionmanaged cloud database proxyserverless cloud sql accessgoogle cloud sql driver
Topics
google-cloudiam-authtls-encryption

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “cloud sql python connector”

Give your agent the search over MCP, or paste the wish link into any chat.

More Database packages

psycopg2-binary Worth it
PyPI · Software Development · released Apr 2026

psycopg2-binary is a PostgreSQL database adapter for Python that implements the DB API 2.0 specification, enabling Python applications to connect to and query PostgreSQL databases with thread-safe concurrent operations.

copyleftcompiled wheel · 3.9+
271.6Mdownloads / mo
redis Worth it
PyPI · Database · released Jul 2026

Python client library for connecting to and executing commands against Redis key-value stores, supporting both synchronous and asynchronous operations.

Install it if your application needs to interact with Redis; the only prerequisite is a running Redis server instance.

MITpure Python · 3.10+
268.3Mdownloads / mo
ydb Worth it
PyPI · Database · released Jul 2026

YDB Python SDK is the official client library for connecting to and querying YDB databases from Python applications.

Install it if you need to connect Python applications to YDB databases.

permissive licensepure Python · 3.10+
210.0Mdownloads / mo
snowflake-connector-python Worth it
PyPI · Software Development · released Aug 2026

Connects Python applications to Snowflake data warehouses using the DB API 2.0 specification, enabling SQL queries, data transfers, and warehouse operations.

Apache-2.0compiled wheel · 3.10+
193.6Mdownloads / mo
sqlparse Worth it
PyPI · Software Development · released Aug 2026

sqlparse tokenizes SQL text into a tree of statements, clauses, and expressions, and provides functions to split scripts, format queries, and inspect parsed tokens without validating dialect or syntax.

Install it if you need to manipulate, format, or analyze SQL text programmatically.

BSD-3-Clausepure Python · 3.10+
148.9Mdownloads / mo
dbt-adapters With conditions
PyPI · Database · released Jul 2026

Provides base adapter protocols and shared functionality that database adapters use to integrate with dbt-core, handling connections, dialect translation, relation caching, and core interface management.

Apache-2.0pure Python · 3.10.0+
121.3Mdownloads / mo

See also google-cloud-alloydb-connector · sqlalchemy-rdsiam · ipython-sql · gcloud-aio-auth · databricks-sql-connector · redshift-connector · sqlalchemy-pytds · sqlalchemy-aurora-data-api · google-cloud-iam · sqlalchemy-databricks