--- id: google-cloud-alloydb-connector version: "1.13.1" license: Apache-2.0 license_treatment: permissive maintenance: active --- # google-cloud-alloydb-connector — A Python client library for connecting securely to your Google Cloud AlloyDB instances. License: permissive · Maintenance: active · Downloads: 754.6K/mo ## What it is and what it does The AlloyDB Python Connector is Google Cloud's recommended library for connecting Python applications to AlloyDB instances. It wraps PostgreSQL drivers and handles TLS 1.3 encryption, IAM-based authorization, and automatic credential refresh without requiring manual certificate or firewall management. The connector maintains a background refresh cycle to keep credentials warm, so you create one per application and reuse it across requests. It supports both synchronous and asynchronous patterns and integrates with common PostgreSQL drivers. You authenticate using Google Cloud IAM roles rather than database passwords (optionally), configure connectivity mode (private IP, public IP, or Private Service Connect), and optionally enable IAM database authentication. The library is production-stable, actively maintained, and supports Python 3.10 through 3.14. Use it for: - Connect a web application to AlloyDB with automatic credential refresh and IAM-based authentication. - Build async Python services that authenticate via IAM instead of managing database passwords. - Deploy to serverless environments with lazy credential refresh to avoid background CPU throttling. - Replace direct PostgreSQL connections with IAM-based authentication for improved security and auditability. - Manage multi-region or multi-cluster AlloyDB access from a single Python application using instance URIs. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides secure, IAM-based connections to Google Cloud AlloyDB instances from Python applications using TLS 1.3 encryption and automatic credential management, with support for sync and async drivers. Yes. This is the official Google Cloud connector for AlloyDB—actively maintained, production-stable, with no known vulnerabilities, low install friction, and Apache-2.0 licensing. Install it if you are connecting Python to AlloyDB and want automatic TLS, IAM-based auth, and credential lifecycle management without manual certificate handling. ## Install pip install google-cloud-alloydb-connector uv add google-cloud-alloydb-connector poetry add google-cloud-alloydb-connector ## Installing google-cloud-alloydb-connector Before you install: Low friction installation with a pure-Python wheel. Actively maintained with a release 67 days ago and recent commits. Requires Python 3.10 or later and depends on standard Google Cloud libraries (google-auth, google-api-core, protobuf) plus cryptography and requests. License in practice: Apache-2.0 permissive license allows commercial use, modification, and distribution with minimal restrictions—suitable for most production environments. Quickstart: pip install google-cloud-alloydb-connector from google.cloud.alloydbconnector import Connector INSTANCE_URI = "projects/MY_PROJECT/locations/MY_REGION/clusters/MY_CLUSTER/instances/MY_INSTANCE" with Connector() as connector: conn = connector.connect( INSTANCE_URI, "pg8000", user="my-user", password="my-password", db="my-db" ) Requires Google Cloud credentials via Application Default Credentials (ADC), AlloyDB API enabled in your project, and the AlloyDB Client IAM role on your instance. Code must run in an environment connected to the VPC hosting your AlloyDB instance (or configured for public IP/PSC). Verify before relying: - Performance characteristics and connection pooling overhead compared to direct PostgreSQL drivers - Detailed support timeline for Python 3.14 and future versions beyond the stated semantic versioning policy - Integration patterns with specific database drivers (pg8000, psycopg, asyncpg) and their individual requirements ## Package facts - License: Apache-2.0 (permissive) - Python support: supports_current - Install friction: low - Maintenance: active - Downloads: 754.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags alloydb python connector, google cloud alloydb client, secure database connection google cloud, iam database authentication python, postgresql alloydb connector, asyncpg alloydb, tls encrypted database connection, google-cloud, alloydb, iam-auth [View on SkillFed](https://skillfed.io/packages/google-cloud-alloydb-connector) · [View on PyPI](https://pypi.org/project/google-cloud-alloydb-connector/)