Skip to content

Commit 8a7f686

Browse files
committed
fix(dbapi): import all
1 parent f17429d commit 8a7f686

File tree

2 files changed

+5
-35
lines changed

2 files changed

+5
-35
lines changed

sqlalchemy-sqlitecloud/sqlalchemy_sqlitecloud/provision.py

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import os
22

3-
from dotenv import load_dotenv
3+
from dotenv import find_dotenv, load_dotenv
44
from sqlalchemy.engine import make_url
55
from sqlalchemy.pool import Pool
66
from sqlalchemy.testing.provision import (
@@ -10,17 +10,13 @@
1010
temp_table_keyword_args,
1111
)
1212

13-
_drivernames = {
14-
"sqlitecloud",
15-
}
16-
1713

1814
@generate_driver_url.for_db("sqlitecloud")
1915
def 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")

src/sqlitecloud/__init__.py

Lines changed: 3 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,7 @@
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

337
VERSION = "0.0.81"

0 commit comments

Comments
 (0)