wherobots-python-dbapi 0.17.0__tar.gz → 0.18.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: wherobots-python-dbapi
3
- Version: 0.17.0
3
+ Version: 0.18.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
@@ -118,12 +118,16 @@ users may find useful:
118
118
  client application. The default is EWKT (string) and the most
119
119
  convenient for human inspection while still being usable by
120
120
  libraries like Shapely.
121
- * `session_type`: `"single"` or `"multi"`; if set to `"single"`, then each call
122
- to `connect()` establishes an exclusive connection to a distinct and dedicated
123
- Wherobots runtime; if set to "multi", then multiple `connect()` calls with the
124
- same arguments and credentials will connect to the same shared Wherobots runtime;
125
- `"single"` is the default.
126
-
127
- Consider multi-session for potential cost savings, but be mindful of
128
- performance impacts from shared resources. You might need to adjust
129
- cluster size if slowdowns occur, which could affect overall cost.
121
+ * `version`: one of the WherobotsDB runtime versions that is available
122
+ to you, if you need to pin your usage to a particular, supported
123
+ WherobotsDB version. Defaults to `"latest"`.
124
+ * `session_type`: `"single"` or `"multi"`; if set to `"single"`, then
125
+ each call to `connect()` establishes an exclusive connection to a
126
+ distinct and dedicated Wherobots runtime; if set to "multi", then
127
+ multiple `connect()` calls with the same arguments and credentials
128
+ will connect to the same shared Wherobots runtime; `"multi"` is the
129
+ default.
130
+
131
+ Consider multi-session for potential cost savings, but be mindful of
132
+ performance impacts from shared resources. You might need to adjust
133
+ cluster size if slowdowns occur, which could affect overall cost.
@@ -94,12 +94,16 @@ users may find useful:
94
94
  client application. The default is EWKT (string) and the most
95
95
  convenient for human inspection while still being usable by
96
96
  libraries like Shapely.
97
- * `session_type`: `"single"` or `"multi"`; if set to `"single"`, then each call
98
- to `connect()` establishes an exclusive connection to a distinct and dedicated
99
- Wherobots runtime; if set to "multi", then multiple `connect()` calls with the
100
- same arguments and credentials will connect to the same shared Wherobots runtime;
101
- `"single"` is the default.
102
-
103
- Consider multi-session for potential cost savings, but be mindful of
104
- performance impacts from shared resources. You might need to adjust
105
- cluster size if slowdowns occur, which could affect overall cost.
97
+ * `version`: one of the WherobotsDB runtime versions that is available
98
+ to you, if you need to pin your usage to a particular, supported
99
+ WherobotsDB version. Defaults to `"latest"`.
100
+ * `session_type`: `"single"` or `"multi"`; if set to `"single"`, then
101
+ each call to `connect()` establishes an exclusive connection to a
102
+ distinct and dedicated Wherobots runtime; if set to "multi", then
103
+ multiple `connect()` calls with the same arguments and credentials
104
+ will connect to the same shared Wherobots runtime; `"multi"` is the
105
+ default.
106
+
107
+ Consider multi-session for potential cost savings, but be mindful of
108
+ performance impacts from shared resources. You might need to adjust
109
+ cluster size if slowdowns occur, which could affect overall cost.
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "wherobots-python-dbapi"
3
- version = "0.17.0"
3
+ version = "0.18.0"
4
4
  description = "Python DB-API driver for Wherobots DB"
5
5
  authors = [{ name = "Maxime Petazzoni", email = "max@wherobots.com" }]
6
6
  requires-python = "~=3.8"
@@ -12,6 +12,7 @@ STAGING_ENDPOINT: str = "api.staging.wherobots.com" # "api.staging.wherobots.co
12
12
 
13
13
  DEFAULT_RUNTIME: Runtime = Runtime.TINY
14
14
  DEFAULT_REGION: Region = Region.AWS_US_WEST_2
15
+ DEFAULT_VERSION: str = "latest"
15
16
  DEFAULT_SESSION_TYPE: SessionType = SessionType.MULTI
16
17
  DEFAULT_READ_TIMEOUT_SECONDS: float = 0.25
17
18
  DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS: float = 900
@@ -24,6 +24,7 @@ from .constants import (
24
24
  DEFAULT_READ_TIMEOUT_SECONDS,
25
25
  DEFAULT_SESSION_TYPE,
26
26
  DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
27
+ DEFAULT_VERSION,
27
28
  MAX_MESSAGE_SIZE,
28
29
  PARAM_STYLE,
29
30
  PROTOCOL_VERSION,
@@ -63,6 +64,7 @@ def connect(
63
64
  api_key: Union[str, None] = None,
64
65
  runtime: Union[Runtime, None] = None,
65
66
  region: Union[Region, None] = None,
67
+ version: Union[str, None] = None,
66
68
  wait_timeout: float = DEFAULT_SESSION_WAIT_TIMEOUT_SECONDS,
67
69
  read_timeout: float = DEFAULT_READ_TIMEOUT_SECONDS,
68
70
  session_type: Union[SessionType, None] = None,
@@ -85,11 +87,13 @@ def connect(
85
87
  host = host or DEFAULT_ENDPOINT
86
88
  runtime = runtime or DEFAULT_RUNTIME
87
89
  region = region or DEFAULT_REGION
90
+ version = version or DEFAULT_VERSION
88
91
  session_type = session_type or DEFAULT_SESSION_TYPE
89
92
 
90
93
  logging.info(
91
- "Requesting %s runtime in %s from %s ...",
94
+ "Requesting %s runtime running %s in %s from %s ...",
92
95
  runtime.value,
96
+ version,
93
97
  region.value,
94
98
  host,
95
99
  )
@@ -105,6 +109,7 @@ def connect(
105
109
  json={
106
110
  "runtimeId": runtime.value,
107
111
  "shutdownAfterInactiveSeconds": shutdown_after_inactive_seconds,
112
+ "version": version,
108
113
  "sessionType": session_type.value,
109
114
  },
110
115
  headers=headers,