From c23fb9387e1f6d755e0965da32964b88e3bbdf2a Mon Sep 17 00:00:00 2001 From: prmoore77 Date: Thu, 25 Jul 2024 10:36:49 -0400 Subject: [PATCH] Minor README.md update for Python ADBC code block --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index c889095..a27e7ae 100644 --- a/README.md +++ b/README.md @@ -145,14 +145,14 @@ python In the Python shell - you can then run: ```python +import os from adbc_driver_flightsql import dbapi as sqlflite, DatabaseOptions -sqlflite_password = "sqlflite_password" # Use an env var in production code! with sqlflite.connect(uri="grpc+tls://localhost:31337", - db_kwargs={"username": "sqlflite_username", - "password": sqlflite_password, - DatabaseOptions.TLS_SKIP_VERIFY.value: "true" # Not needed if you use a trusted CA-signed TLS cert + db_kwargs={"username": os.getenv("SQLFLITE_USERNAME", "sqlflite_username"), + "password": os.getenv("SQLFLITE_PASSWORD", "sqlflite_password"), + DatabaseOptions.TLS_SKIP_VERIFY.value: "true" # Not needed if you use a trusted CA-signed TLS cert } ) as conn: with conn.cursor() as cur: