File tree Expand file tree Collapse file tree 2 files changed +5
-35
lines changed
sqlalchemy-sqlitecloud/sqlalchemy_sqlitecloud Expand file tree Collapse file tree 2 files changed +5
-35
lines changed Original file line number Diff line number Diff line change 11import os
22
3- from dotenv import load_dotenv
3+ from dotenv import find_dotenv , load_dotenv
44from sqlalchemy .engine import make_url
55from sqlalchemy .pool import Pool
66from sqlalchemy .testing .provision import (
1010 temp_table_keyword_args ,
1111)
1212
13- _drivernames = {
14- "sqlitecloud" ,
15- }
16-
1713
1814@generate_driver_url .for_db ("sqlitecloud" )
1915def generate_driver_url (url , driver , query_str ):
2016 # no database specified here, it's created and used later
2117 # eg: sqlitecloud://mynode.sqlite.cloud/?apikey=key123
2218
23- load_dotenv ("../../.env" )
19+ load_dotenv (find_dotenv ( "../../.env" ) )
2420
2521 connection_string = os .getenv ("SQLITE_CONNECTION_STRING" )
2622 apikey = os .getenv ("SQLITE_API_KEY" )
Original file line number Diff line number Diff line change 1- # To replicate the public interface of sqlite3, we need to import
2- # the classes and functions from the dbapi2 module.
1+ # To replicate the public interface of sqlite3,
2+ # we need to import everything from the dbapi2 module.
33# eg: sqlite3.connect() -> sqlitecloud.connect()
44#
5-
6- from .dbapi2 import (
7- PARSE_COLNAMES ,
8- PARSE_DECLTYPES ,
9- Connection ,
10- Cursor ,
11- Row ,
12- adapters ,
13- connect ,
14- converters ,
15- register_adapter ,
16- register_converter ,
17- )
18-
19- __all__ = [
20- "VERSION" ,
21- "Connection" ,
22- "Cursor" ,
23- "connect" ,
24- "register_adapter" ,
25- "register_converter" ,
26- "PARSE_DECLTYPES" ,
27- "PARSE_COLNAMES" ,
28- "adapters" ,
29- "converters" ,
30- "Row" ,
31- ]
5+ from .dbapi2 import * # noqa
326
337VERSION = "0.0.81"
You can’t perform that action at this time.
0 commit comments