We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9633f59 commit 2c35c06Copy full SHA for 2c35c06
tests/system/test_pg8000_iam_auth.py
@@ -25,6 +25,9 @@
25
table_name = f"books_{uuid.uuid4().hex}"
26
27
28
+# [START cloud_sql_connector_postgres_pg8000_iam_auth]
29
+# The Cloud SQL Python Connector can be used along with SQLAlchemy using the
30
+# 'creator' argument to 'create_engine'
31
def init_connection_engine() -> sqlalchemy.engine.Engine:
32
def getconn() -> pg8000.dbapi.Connection:
33
conn: pg8000.dbapi.Connection = connector.connect(
@@ -44,6 +47,9 @@ def getconn() -> pg8000.dbapi.Connection:
44
47
return engine
45
48
46
49
50
+# [END cloud_sql_connector_postgres_pg8000_iam_auth]
51
+
52
53
@pytest.fixture(name="pool")
54
def setup() -> Generator:
55
pool = init_connection_engine()
0 commit comments