File tree 10 files changed +30
-22
lines changed
10 files changed +30
-22
lines changed Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_with_connector initializes a connection pool for a
25
- # Cloud SQL instance of MySQL using the Cloud SQL Python Connector.
26
24
def connect_with_connector () -> sqlalchemy .engine .base .Engine :
25
+ """
26
+ Initializes a connection pool for a Cloud SQL instance of MySQL.
27
+
28
+ Uses the Cloud SQL Python Connector package.
29
+ """
27
30
# Note: Saving credentials in environment variables is convenient, but not
28
31
# secure - consider a more secure solution such as
29
32
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_with_connector_auto_iam_authn initializes a connection pool for
25
- # a Cloud SQL instance of MySQL using the Cloud SQL Python Connector
26
- # with Automatic IAM Database Authentication.
27
24
def connect_with_connector_auto_iam_authn () -> sqlalchemy .engine .base .Engine :
25
+ """
26
+ Initializes a connection pool for a Cloud SQL instance of MySQL.
27
+
28
+ Uses the Cloud SQL Python Connector with Automatic IAM Database Authentication.
29
+ """
28
30
# Note: Saving credentials in environment variables is convenient, but not
29
31
# secure - consider a more secure solution such as
30
32
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_tcp_socket initializes a TCP connection pool
25
- # for a Cloud SQL instance of MySQL.
26
24
def connect_tcp_socket () -> sqlalchemy .engine .base .Engine :
25
+ """ Initializes a TCP connection pool for a Cloud SQL instance of MySQL. """
27
26
# Note: Saving credentials in environment variables is convenient, but not
28
27
# secure - consider a more secure solution such as
29
28
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 18
18
import sqlalchemy
19
19
20
20
21
- # connect_unix_socket initializes a Unix socket connection pool for
22
- # a Cloud SQL instance of MySQL.
23
21
def connect_unix_socket () -> sqlalchemy .engine .base .Engine :
22
+ """ Initializes a Unix socket connection pool for a Cloud SQL instance of MySQL. """
24
23
# Note: Saving credentials in environment variables is convenient, but not
25
24
# secure - consider a more secure solution such as
26
25
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_with_connector initializes a connection pool for a
25
- # Cloud SQL instance of Postgres using the Cloud SQL Python Connector.
26
24
def connect_with_connector () -> sqlalchemy .engine .base .Engine :
25
+ """
26
+ Initializes a connection pool for a Cloud SQL instance of Postgres.
27
+
28
+ Uses the Cloud SQL Python Connector package.
29
+ """
27
30
# Note: Saving credentials in environment variables is convenient, but not
28
31
# secure - consider a more secure solution such as
29
32
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_with_connector_auto_iam_authn initializes a connection pool for
25
- # a Cloud SQL instance of Postgres using the Cloud SQL Python Connector
26
- # with Automatic IAM Database Authentication.
27
24
def connect_with_connector_auto_iam_authn () -> sqlalchemy .engine .base .Engine :
25
+ """
26
+ Initializes a connection pool for a Cloud SQL instance of Postgres.
27
+
28
+ Uses the Cloud SQL Python Connector with Automatic IAM Database Authentication.
29
+ """
28
30
# Note: Saving credentials in environment variables is convenient, but not
29
31
# secure - consider a more secure solution such as
30
32
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 22
22
import sqlalchemy
23
23
24
24
25
- # connect_tcp_socket initializes a TCP connection pool
26
- # for a Cloud SQL instance of Postgres.
27
25
def connect_tcp_socket () -> sqlalchemy .engine .base .Engine :
26
+ """ Initializes a TCP connection pool for a Cloud SQL instance of Postgres. """
28
27
# Note: Saving credentials in environment variables is convenient, but not
29
28
# secure - consider a more secure solution such as
30
29
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 18
18
import sqlalchemy
19
19
20
20
21
- # connect_unix_socket initializes a Unix socket connection pool for
22
- # a Cloud SQL instance of Postgres.
23
21
def connect_unix_socket () -> sqlalchemy .engine .base .Engine :
22
+ """ Initializes a Unix socket connection pool for a Cloud SQL instance of Postgres. """
24
23
# Note: Saving credentials in environment variables is convenient, but not
25
24
# secure - consider a more secure solution such as
26
25
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_with_connector initializes a connection pool for a
25
- # Cloud SQL instance of SQL Server using the Cloud SQL Python Connector.
26
24
def connect_with_connector () -> sqlalchemy .engine .base .Engine :
25
+ """
26
+ Initializes a connection pool for a Cloud SQL instance of SQL Server.
27
+
28
+ Uses the Cloud SQL Python Connector package.
29
+ """
27
30
# Note: Saving credentials in environment variables is convenient, but not
28
31
# secure - consider a more secure solution such as
29
32
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
Original file line number Diff line number Diff line change 21
21
import sqlalchemy
22
22
23
23
24
- # connect_tcp_socket initializes a TCP connection pool
25
- # for a Cloud SQL instance of SQL Server.
26
24
def connect_tcp_socket () -> sqlalchemy .engine .base .Engine :
25
+ """ Initializes a TCP connection pool for a Cloud SQL instance of SQL Server. """
27
26
# Note: Saving credentials in environment variables is convenient, but not
28
27
# secure - consider a more secure solution such as
29
28
# Cloud Secret Manager (https://cloud.google.com/secret-manager) to help
You can’t perform that action at this time.
0 commit comments