GoogleCloudPlatform / alloydb-python-connector

A Python library for connecting securely to your AlloyDB instances.
Apache License 2.0
26 stars 7 forks source link

feat: support `ip_type` as str #267

Closed jackwotherspoon closed 4 months ago

jackwotherspoon commented 4 months ago

Adding support for ip_type as str type with options as "PUBLIC", "PRIVATE".

If users want to configure a Connector for a specific IP type they currently need to import IPTypes first and then set ip_type=IPTypes.PUBLIC in the Connector config or during their call to connect.

from google.cloud.alloydb.connector import IPTypes

This is an extra step that is unnecessary and causes friction to users, we should support users passing in the IPTypes enum or string value. This will allow users to not have to import the additional class.

Closes #247