File tree Expand file tree Collapse file tree
src/langchain_google_cloud_sql_mysql Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ requires-python = ">=3.8"
88dependencies = [
99 " langchain==0.1.1" ,
1010 " SQLAlchemy==2.0.7" ,
11- " cloud-sql-python-connector[pymysql]==1.5 .0"
11+ " cloud-sql-python-connector[pymysql]==1.7 .0"
1212]
1313
1414[tool .setuptools .dynamic ]
Original file line number Diff line number Diff line change 2323import sqlalchemy
2424from google .cloud .sql .connector import Connector
2525
26+ from .version import __version__
27+
2628if TYPE_CHECKING :
2729 import google .auth .credentials
2830 import pymysql
2931
32+ USER_AGENT = "langchain-google-cloud-sql-mysql-python/" + __version__
33+
3034
3135def _get_iam_principal_email (
3236 credentials : google .auth .credentials .Credentials ,
@@ -174,7 +178,7 @@ def _create_connector_engine(
174178 enable_iam_auth = True
175179
176180 if cls ._connector is None :
177- cls ._connector = Connector ()
181+ cls ._connector = Connector (user_agent = USER_AGENT )
178182
179183 # anonymous function to be used for SQLAlchemy 'creator' argument
180184 def getconn () -> pymysql .Connection :
Original file line number Diff line number Diff line change 1212# See the License for the specific language governing permissions and
1313# limitations under the License.
1414
15- __version__ = "0.1.0 "
15+ __version__ = "0.0.1 "
You can’t perform that action at this time.
0 commit comments