django db engine for using IAM Authentication with Google Cloud SQL.
Available on pypi at https://pypi.org/project/django-gcp-iam-auth
pip install django_gcp_iam_auth
- Update the DATABASES entry to replace the ENGINE for your connection
- Set
gcp_iam_auth
toTrue
in theOPTIONS
for that connection.
DATABASES["default"]["ENGINE"] = "django_gcp_iam_auth.postgresql"
DATABASES["default"]["OPTIONS"]["gcp_iam_auth"] = True