wherobots-python-dbapi 0.19.0__tar.gz → 0.20.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/PKG-INFO +27 -11
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/README.md +25 -9
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/pyproject.toml +2 -2
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/driver.py +9 -1
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/runtime.py +1 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/.gitignore +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/LICENSE +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/__init__.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/__init__.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/connection.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/constants.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/cursor.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/errors.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/region.py +0 -0
- {wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/session_type.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: wherobots-python-dbapi
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.20.0
|
|
4
4
|
Summary: Python DB-API driver for Wherobots DB
|
|
5
5
|
Project-URL: Homepage, https://github.com/wherobots/wherobots-python-dbapi-driver
|
|
6
6
|
Project-URL: Tracker, https://github.com/wherobots/wherobots-python-dbapi-driver/issues
|
|
7
7
|
Author-email: Maxime Petazzoni <max@wherobots.com>
|
|
8
8
|
License-Expression: Apache-2.0
|
|
9
9
|
License-File: LICENSE
|
|
10
|
-
Requires-Python:
|
|
10
|
+
Requires-Python: <4,>=3.8
|
|
11
11
|
Requires-Dist: cbor2>=5.6.3
|
|
12
12
|
Requires-Dist: packaging
|
|
13
13
|
Requires-Dist: pandas
|
|
@@ -103,6 +103,12 @@ into. Wherobots Cloud supports the following compute regions:
|
|
|
103
103
|
> and customers; other regions are currently reserved to Professional
|
|
104
104
|
> Edition customers.
|
|
105
105
|
|
|
106
|
+
> [!WARNING]
|
|
107
|
+
> To prepare for the expansion of Wherobots Cloud to new regions and cloud providers, the `region` parameter will become mandatory in a future SDK version.
|
|
108
|
+
> Before this support for new regions is added, we will release an updated version of the SDK.
|
|
109
|
+
> While you can continue using an older SDK version for your development,
|
|
110
|
+
> any new or existing SQL session you initialize without specifying the `region` parameter will be hosted in the `aws-us-west-2` region.
|
|
111
|
+
|
|
106
112
|
### Advanced parameters
|
|
107
113
|
|
|
108
114
|
The `connect()` method takes some additional parameters that advanced
|
|
@@ -123,12 +129,22 @@ users may find useful:
|
|
|
123
129
|
to you, if you need to pin your usage to a particular, supported
|
|
124
130
|
WherobotsDB version. Defaults to `"latest"`.
|
|
125
131
|
* `session_type`: `"single"` or `"multi"`; if set to `"single"`, then
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
132
|
+
each call to `connect()` establishes an exclusive connection to a
|
|
133
|
+
distinct and dedicated Wherobots runtime; if set to "multi", then
|
|
134
|
+
multiple `connect()` calls with the same arguments and credentials
|
|
135
|
+
will connect to the same shared Wherobots runtime; `"multi"` is the
|
|
136
|
+
default.
|
|
137
|
+
|
|
138
|
+
Consider multi-session for potential cost savings, but be mindful of
|
|
139
|
+
performance impacts from shared resources. You might need to adjust
|
|
140
|
+
cluster size if slowdowns occur, which could affect overall cost.
|
|
141
|
+
* `shutdown_after_inactive_seconds`: how long the runtime waits and
|
|
142
|
+
stays running after all clients have disconnected. This delay gives
|
|
143
|
+
an opportunity for clients to reconnect to a previously-established
|
|
144
|
+
runtime without having to start a new one.
|
|
145
|
+
|
|
146
|
+
If you're using a simple "connect-query-disconnect" pattern from
|
|
147
|
+
your application, you can set this parameter to a value greater than
|
|
148
|
+
your expected time between queries and effectively get a continuously
|
|
149
|
+
running SQL session runtime without any complex connection management
|
|
150
|
+
in your application.
|
|
@@ -79,6 +79,12 @@ into. Wherobots Cloud supports the following compute regions:
|
|
|
79
79
|
> and customers; other regions are currently reserved to Professional
|
|
80
80
|
> Edition customers.
|
|
81
81
|
|
|
82
|
+
> [!WARNING]
|
|
83
|
+
> To prepare for the expansion of Wherobots Cloud to new regions and cloud providers, the `region` parameter will become mandatory in a future SDK version.
|
|
84
|
+
> Before this support for new regions is added, we will release an updated version of the SDK.
|
|
85
|
+
> While you can continue using an older SDK version for your development,
|
|
86
|
+
> any new or existing SQL session you initialize without specifying the `region` parameter will be hosted in the `aws-us-west-2` region.
|
|
87
|
+
|
|
82
88
|
### Advanced parameters
|
|
83
89
|
|
|
84
90
|
The `connect()` method takes some additional parameters that advanced
|
|
@@ -99,12 +105,22 @@ users may find useful:
|
|
|
99
105
|
to you, if you need to pin your usage to a particular, supported
|
|
100
106
|
WherobotsDB version. Defaults to `"latest"`.
|
|
101
107
|
* `session_type`: `"single"` or `"multi"`; if set to `"single"`, then
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
108
|
+
each call to `connect()` establishes an exclusive connection to a
|
|
109
|
+
distinct and dedicated Wherobots runtime; if set to "multi", then
|
|
110
|
+
multiple `connect()` calls with the same arguments and credentials
|
|
111
|
+
will connect to the same shared Wherobots runtime; `"multi"` is the
|
|
112
|
+
default.
|
|
113
|
+
|
|
114
|
+
Consider multi-session for potential cost savings, but be mindful of
|
|
115
|
+
performance impacts from shared resources. You might need to adjust
|
|
116
|
+
cluster size if slowdowns occur, which could affect overall cost.
|
|
117
|
+
* `shutdown_after_inactive_seconds`: how long the runtime waits and
|
|
118
|
+
stays running after all clients have disconnected. This delay gives
|
|
119
|
+
an opportunity for clients to reconnect to a previously-established
|
|
120
|
+
runtime without having to start a new one.
|
|
121
|
+
|
|
122
|
+
If you're using a simple "connect-query-disconnect" pattern from
|
|
123
|
+
your application, you can set this parameter to a value greater than
|
|
124
|
+
your expected time between queries and effectively get a continuously
|
|
125
|
+
running SQL session runtime without any complex connection management
|
|
126
|
+
in your application.
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "wherobots-python-dbapi"
|
|
3
|
-
version = "0.
|
|
3
|
+
version = "0.20.0"
|
|
4
4
|
description = "Python DB-API driver for Wherobots DB"
|
|
5
5
|
authors = [{ name = "Maxime Petazzoni", email = "max@wherobots.com" }]
|
|
6
|
-
requires-python = "
|
|
6
|
+
requires-python = ">=3.8, <4"
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
license = "Apache-2.0"
|
|
9
9
|
dependencies = [
|
|
@@ -116,7 +116,15 @@ def connect(
|
|
|
116
116
|
)
|
|
117
117
|
resp.raise_for_status()
|
|
118
118
|
except requests.HTTPError as e:
|
|
119
|
-
|
|
119
|
+
details = str(e)
|
|
120
|
+
try:
|
|
121
|
+
info = e.response.json()
|
|
122
|
+
errors = info.get("errors", [])
|
|
123
|
+
if errors and isinstance(errors, list):
|
|
124
|
+
details = f"{errors[0]['message']}: {errors[0]['details']}"
|
|
125
|
+
except requests.JSONDecodeError:
|
|
126
|
+
pass
|
|
127
|
+
raise InterfaceError(f"Failed to create SQL session: {details}") from e
|
|
120
128
|
|
|
121
129
|
# At this point we've been redirected to /sql/session/{session_id}, which we'll need to keep polling until the
|
|
122
130
|
# session is in READY state.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{wherobots_python_dbapi-0.19.0 → wherobots_python_dbapi-0.20.0}/wherobots/db/session_type.py
RENAMED
|
File without changes
|