mapepire-python 0.3.0__tar.gz → 0.3.1__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.
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/PKG-INFO +35 -11
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/README.md +28 -5
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/authentication/kerberosTokenProvider.py +14 -8
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/version.py +1 -1
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/PKG-INFO +35 -11
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/requires.txt +8 -4
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/pyproject.toml +8 -6
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/LICENSE +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/__init__.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/async_base_job.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/asyncio/__init__.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/asyncio/connection.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/asyncio/cursor.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/base_job.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/client/__init__.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/client/async_sql_job.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/client/query.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/client/sql_job.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/client/websocket_client.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/core/__init__.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/core/connection.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/core/cursor.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/core/exceptions.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/core/utils.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/data_types.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/__init__.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/async_websocket_client.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/pool_client.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/pool_job.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/pool_query.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/py.typed +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/query_manager.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/ssl.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/websocket.py +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/SOURCES.txt +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/dependency_links.txt +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/top_level.txt +0 -0
- {mapepire_python-0.3.0 → mapepire_python-0.3.1}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapepire-python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Author-email: Adam Shedivy <adam.shedivy@ibm.com>, Irfan Sharif <IrfanSharif@ibm.com>
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -219,11 +219,14 @@ License-File: LICENSE
|
|
|
219
219
|
Requires-Dist: dataclasses-json>=0.6.4
|
|
220
220
|
Requires-Dist: websockets>=14.0
|
|
221
221
|
Requires-Dist: pep249abc
|
|
222
|
+
Provides-Extra: kerberos
|
|
223
|
+
Requires-Dist: gssapi; sys_platform != "win32" and extra == "kerberos"
|
|
224
|
+
Requires-Dist: pywin32; sys_platform == "win32" and extra == "kerberos"
|
|
222
225
|
Provides-Extra: dev
|
|
223
|
-
Requires-Dist: ruff; extra == "dev"
|
|
224
|
-
Requires-Dist: mypy<
|
|
226
|
+
Requires-Dist: ruff<0.16,>=0.15; extra == "dev"
|
|
227
|
+
Requires-Dist: mypy<2.4,>=1.0; extra == "dev"
|
|
225
228
|
Requires-Dist: black<27.0,>=24.3.0; extra == "dev"
|
|
226
|
-
Requires-Dist: isort<
|
|
229
|
+
Requires-Dist: isort<8.1,>=5.12; extra == "dev"
|
|
227
230
|
Requires-Dist: pytest>=9.0.3; extra == "dev"
|
|
228
231
|
Requires-Dist: pep249abc; extra == "dev"
|
|
229
232
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
@@ -236,8 +239,6 @@ Requires-Dist: packaging; extra == "dev"
|
|
|
236
239
|
Requires-Dist: pre-commit; extra == "dev"
|
|
237
240
|
Requires-Dist: python-dotenv; extra == "dev"
|
|
238
241
|
Requires-Dist: pytest-env; extra == "dev"
|
|
239
|
-
Requires-Dist: gssapi; extra == "dev"
|
|
240
|
-
Requires-Dist: pywin32; sys_platform == "win32" and extra == "dev"
|
|
241
242
|
Dynamic: license-file
|
|
242
243
|
|
|
243
244
|
# mapepire-python
|
|
@@ -261,6 +262,7 @@ Dynamic: license-file
|
|
|
261
262
|
- [Overview](#overview)
|
|
262
263
|
- [Setup](#setup)
|
|
263
264
|
- [Install with `pip`](#install-with-pip)
|
|
265
|
+
- [Optional: Kerberos authentication support](#optional-kerberos-authentication-support)
|
|
264
266
|
- [Server Component Setup](#server-component-setup)
|
|
265
267
|
- [Quick Start](#quick-start)
|
|
266
268
|
- [Other Connection options](#other-connection-options)
|
|
@@ -332,6 +334,23 @@ Dynamic: license-file
|
|
|
332
334
|
pip install mapepire-python
|
|
333
335
|
```
|
|
334
336
|
|
|
337
|
+
#### Optional: Kerberos authentication support
|
|
338
|
+
|
|
339
|
+
Kerberos authentication (see [Authenticating with Kerberos](#11-authenticating-with-kerberos)) requires the optional `kerberos` extra, which pulls in `gssapi` on Linux/macOS or `pywin32` on Windows:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
pip install mapepire-python[kerberos]
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
On Linux, building `gssapi` also requires Kerberos development headers to be available, e.g.:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
sudo apt install libkrb5-dev # Debian/Ubuntu
|
|
349
|
+
sudo dnf install krb5-devel # Fedora/RHEL
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
If you don't use Kerberos authentication, you don't need this extra — the base `pip install mapepire-python` has no Kerberos dependencies.
|
|
353
|
+
|
|
335
354
|
### Server Component Setup
|
|
336
355
|
To use mapire-python, you will need to have the Mapepire Server Component running on your IBM i server. Follow these instructions to set up the server component: [Mapepire Server Installation](https://mapepire-ibmi.github.io/guides/sysadmin/)
|
|
337
356
|
|
|
@@ -404,6 +423,9 @@ job = SQLJob(creds)
|
|
|
404
423
|
### 1.1 Authenticating with Kerberos
|
|
405
424
|
If your IBM i is configured to support Kerberos authentication, you can authenticate using Kerberos instead of passing a plain-text password to the `DaemonServer` Object.
|
|
406
425
|
|
|
426
|
+
> [!NOTE]
|
|
427
|
+
> Kerberos support requires the `kerberos` extra: `pip install mapepire-python[kerberos]`. See [Optional: Kerberos authentication support](#optional-kerberos-authentication-support).
|
|
428
|
+
|
|
407
429
|
#### 1.1.1 Windows
|
|
408
430
|
|
|
409
431
|
If your Windows machine is part of a Kerberos realm and supports SSPI authentication, you can authenticate by creating the `DaemonServer` as shown below:
|
|
@@ -486,12 +508,14 @@ First create a `mapepire.ini` file in the root of your project with the followin
|
|
|
486
508
|
|
|
487
509
|
```ini title=mapepire.ini
|
|
488
510
|
[mapepire]
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
511
|
+
host=SERVER
|
|
512
|
+
port=PORT
|
|
513
|
+
user=USER
|
|
514
|
+
password=PASSWORD
|
|
493
515
|
```
|
|
494
516
|
|
|
517
|
+
> **Note:** The keys must match the `DaemonServer` fields (`host`, `port`, `user`, `password`), and values must **not** be quoted — write `host=myhost`, not `host="myhost"`.
|
|
518
|
+
|
|
495
519
|
Then you can create a `SQLJob` object by passing the path to the `.ini` file which will handle the connection details
|
|
496
520
|
|
|
497
521
|
|
|
@@ -573,7 +597,7 @@ logging.getLogger("mapepire_python").setLevel(logging.DEBUG)
|
|
|
573
597
|
|
|
574
598
|
# Usage
|
|
575
599
|
|
|
576
|
-
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all
|
|
600
|
+
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all four connection options detailed above. For simplicity, we assume there is a `mapepire.ini` file in the root of the project with the connection details.
|
|
577
601
|
|
|
578
602
|
|
|
579
603
|
There are four main ways to run queries using `mapepire-python`:
|
|
@@ -19,6 +19,7 @@
|
|
|
19
19
|
- [Overview](#overview)
|
|
20
20
|
- [Setup](#setup)
|
|
21
21
|
- [Install with `pip`](#install-with-pip)
|
|
22
|
+
- [Optional: Kerberos authentication support](#optional-kerberos-authentication-support)
|
|
22
23
|
- [Server Component Setup](#server-component-setup)
|
|
23
24
|
- [Quick Start](#quick-start)
|
|
24
25
|
- [Other Connection options](#other-connection-options)
|
|
@@ -90,6 +91,23 @@
|
|
|
90
91
|
pip install mapepire-python
|
|
91
92
|
```
|
|
92
93
|
|
|
94
|
+
#### Optional: Kerberos authentication support
|
|
95
|
+
|
|
96
|
+
Kerberos authentication (see [Authenticating with Kerberos](#11-authenticating-with-kerberos)) requires the optional `kerberos` extra, which pulls in `gssapi` on Linux/macOS or `pywin32` on Windows:
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
pip install mapepire-python[kerberos]
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
On Linux, building `gssapi` also requires Kerberos development headers to be available, e.g.:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
sudo apt install libkrb5-dev # Debian/Ubuntu
|
|
106
|
+
sudo dnf install krb5-devel # Fedora/RHEL
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
If you don't use Kerberos authentication, you don't need this extra — the base `pip install mapepire-python` has no Kerberos dependencies.
|
|
110
|
+
|
|
93
111
|
### Server Component Setup
|
|
94
112
|
To use mapire-python, you will need to have the Mapepire Server Component running on your IBM i server. Follow these instructions to set up the server component: [Mapepire Server Installation](https://mapepire-ibmi.github.io/guides/sysadmin/)
|
|
95
113
|
|
|
@@ -162,6 +180,9 @@ job = SQLJob(creds)
|
|
|
162
180
|
### 1.1 Authenticating with Kerberos
|
|
163
181
|
If your IBM i is configured to support Kerberos authentication, you can authenticate using Kerberos instead of passing a plain-text password to the `DaemonServer` Object.
|
|
164
182
|
|
|
183
|
+
> [!NOTE]
|
|
184
|
+
> Kerberos support requires the `kerberos` extra: `pip install mapepire-python[kerberos]`. See [Optional: Kerberos authentication support](#optional-kerberos-authentication-support).
|
|
185
|
+
|
|
165
186
|
#### 1.1.1 Windows
|
|
166
187
|
|
|
167
188
|
If your Windows machine is part of a Kerberos realm and supports SSPI authentication, you can authenticate by creating the `DaemonServer` as shown below:
|
|
@@ -244,12 +265,14 @@ First create a `mapepire.ini` file in the root of your project with the followin
|
|
|
244
265
|
|
|
245
266
|
```ini title=mapepire.ini
|
|
246
267
|
[mapepire]
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
268
|
+
host=SERVER
|
|
269
|
+
port=PORT
|
|
270
|
+
user=USER
|
|
271
|
+
password=PASSWORD
|
|
251
272
|
```
|
|
252
273
|
|
|
274
|
+
> **Note:** The keys must match the `DaemonServer` fields (`host`, `port`, `user`, `password`), and values must **not** be quoted — write `host=myhost`, not `host="myhost"`.
|
|
275
|
+
|
|
253
276
|
Then you can create a `SQLJob` object by passing the path to the `.ini` file which will handle the connection details
|
|
254
277
|
|
|
255
278
|
|
|
@@ -331,7 +354,7 @@ logging.getLogger("mapepire_python").setLevel(logging.DEBUG)
|
|
|
331
354
|
|
|
332
355
|
# Usage
|
|
333
356
|
|
|
334
|
-
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all
|
|
357
|
+
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all four connection options detailed above. For simplicity, we assume there is a `mapepire.ini` file in the root of the project with the connection details.
|
|
335
358
|
|
|
336
359
|
|
|
337
360
|
There are four main ways to run queries using `mapepire-python`:
|
|
@@ -6,17 +6,13 @@ from typing import Final, Optional
|
|
|
6
6
|
|
|
7
7
|
logger = logging.getLogger(__name__)
|
|
8
8
|
|
|
9
|
-
sspi = None
|
|
10
|
-
gssapi = None
|
|
11
9
|
PLATFORM = platform.system()
|
|
12
10
|
TOKEN_PREFIX: Final = "_KERBEROSAUTH_"
|
|
13
11
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
else:
|
|
19
|
-
import gssapi
|
|
12
|
+
_KERBEROS_EXTRA_HINT = (
|
|
13
|
+
"Kerberos authentication requires the optional 'kerberos' extra. "
|
|
14
|
+
"Install it with: pip install mapepire-python[kerberos]"
|
|
15
|
+
)
|
|
20
16
|
|
|
21
17
|
|
|
22
18
|
class KerberosTokenProvider:
|
|
@@ -62,6 +58,11 @@ class KerberosTokenProvider:
|
|
|
62
58
|
return TOKEN_PREFIX + token_b64
|
|
63
59
|
|
|
64
60
|
def _refresh_token_windows(self) -> str:
|
|
61
|
+
try:
|
|
62
|
+
import sspi
|
|
63
|
+
except ImportError as e:
|
|
64
|
+
raise ImportError(_KERBEROS_EXTRA_HINT) from e
|
|
65
|
+
|
|
65
66
|
logger.debug("Generating Kerberos token via Windows SSPI for host=%s", self.host)
|
|
66
67
|
target = f"krbsvr400/{self.host}"
|
|
67
68
|
client = sspi.ClientAuth("Kerberos", targetspn=target)
|
|
@@ -76,6 +77,11 @@ class KerberosTokenProvider:
|
|
|
76
77
|
return self._format_token(token)
|
|
77
78
|
|
|
78
79
|
def _refresh_token_unix(self) -> str:
|
|
80
|
+
try:
|
|
81
|
+
import gssapi
|
|
82
|
+
except ImportError as e:
|
|
83
|
+
raise ImportError(_KERBEROS_EXTRA_HINT) from e
|
|
84
|
+
|
|
79
85
|
logger.debug("Generating Kerberos token via GSSAPI for host=%s realm=%s", self.host, self.realm)
|
|
80
86
|
os.environ["KRB5_CONFIG"] = self.krb5_path
|
|
81
87
|
if self.ticket_cache:
|
|
@@ -2,7 +2,7 @@ _MAJOR = "0"
|
|
|
2
2
|
_MINOR = "3"
|
|
3
3
|
# On main and in a nightly release the patch should be one ahead of the last
|
|
4
4
|
# released build.
|
|
5
|
-
_PATCH = "
|
|
5
|
+
_PATCH = "1"
|
|
6
6
|
# This is mainly for nightly builds which have the suffix ".dev$DATE". See
|
|
7
7
|
# https://semver.org/#is-v123-a-semantic-version for the semantics.
|
|
8
8
|
_SUFFIX = ""
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mapepire-python
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Author-email: Adam Shedivy <adam.shedivy@ibm.com>, Irfan Sharif <IrfanSharif@ibm.com>
|
|
5
5
|
License: Apache License
|
|
6
6
|
Version 2.0, January 2004
|
|
@@ -219,11 +219,14 @@ License-File: LICENSE
|
|
|
219
219
|
Requires-Dist: dataclasses-json>=0.6.4
|
|
220
220
|
Requires-Dist: websockets>=14.0
|
|
221
221
|
Requires-Dist: pep249abc
|
|
222
|
+
Provides-Extra: kerberos
|
|
223
|
+
Requires-Dist: gssapi; sys_platform != "win32" and extra == "kerberos"
|
|
224
|
+
Requires-Dist: pywin32; sys_platform == "win32" and extra == "kerberos"
|
|
222
225
|
Provides-Extra: dev
|
|
223
|
-
Requires-Dist: ruff; extra == "dev"
|
|
224
|
-
Requires-Dist: mypy<
|
|
226
|
+
Requires-Dist: ruff<0.16,>=0.15; extra == "dev"
|
|
227
|
+
Requires-Dist: mypy<2.4,>=1.0; extra == "dev"
|
|
225
228
|
Requires-Dist: black<27.0,>=24.3.0; extra == "dev"
|
|
226
|
-
Requires-Dist: isort<
|
|
229
|
+
Requires-Dist: isort<8.1,>=5.12; extra == "dev"
|
|
227
230
|
Requires-Dist: pytest>=9.0.3; extra == "dev"
|
|
228
231
|
Requires-Dist: pep249abc; extra == "dev"
|
|
229
232
|
Requires-Dist: pytest-asyncio; extra == "dev"
|
|
@@ -236,8 +239,6 @@ Requires-Dist: packaging; extra == "dev"
|
|
|
236
239
|
Requires-Dist: pre-commit; extra == "dev"
|
|
237
240
|
Requires-Dist: python-dotenv; extra == "dev"
|
|
238
241
|
Requires-Dist: pytest-env; extra == "dev"
|
|
239
|
-
Requires-Dist: gssapi; extra == "dev"
|
|
240
|
-
Requires-Dist: pywin32; sys_platform == "win32" and extra == "dev"
|
|
241
242
|
Dynamic: license-file
|
|
242
243
|
|
|
243
244
|
# mapepire-python
|
|
@@ -261,6 +262,7 @@ Dynamic: license-file
|
|
|
261
262
|
- [Overview](#overview)
|
|
262
263
|
- [Setup](#setup)
|
|
263
264
|
- [Install with `pip`](#install-with-pip)
|
|
265
|
+
- [Optional: Kerberos authentication support](#optional-kerberos-authentication-support)
|
|
264
266
|
- [Server Component Setup](#server-component-setup)
|
|
265
267
|
- [Quick Start](#quick-start)
|
|
266
268
|
- [Other Connection options](#other-connection-options)
|
|
@@ -332,6 +334,23 @@ Dynamic: license-file
|
|
|
332
334
|
pip install mapepire-python
|
|
333
335
|
```
|
|
334
336
|
|
|
337
|
+
#### Optional: Kerberos authentication support
|
|
338
|
+
|
|
339
|
+
Kerberos authentication (see [Authenticating with Kerberos](#11-authenticating-with-kerberos)) requires the optional `kerberos` extra, which pulls in `gssapi` on Linux/macOS or `pywin32` on Windows:
|
|
340
|
+
|
|
341
|
+
```bash
|
|
342
|
+
pip install mapepire-python[kerberos]
|
|
343
|
+
```
|
|
344
|
+
|
|
345
|
+
On Linux, building `gssapi` also requires Kerberos development headers to be available, e.g.:
|
|
346
|
+
|
|
347
|
+
```bash
|
|
348
|
+
sudo apt install libkrb5-dev # Debian/Ubuntu
|
|
349
|
+
sudo dnf install krb5-devel # Fedora/RHEL
|
|
350
|
+
```
|
|
351
|
+
|
|
352
|
+
If you don't use Kerberos authentication, you don't need this extra — the base `pip install mapepire-python` has no Kerberos dependencies.
|
|
353
|
+
|
|
335
354
|
### Server Component Setup
|
|
336
355
|
To use mapire-python, you will need to have the Mapepire Server Component running on your IBM i server. Follow these instructions to set up the server component: [Mapepire Server Installation](https://mapepire-ibmi.github.io/guides/sysadmin/)
|
|
337
356
|
|
|
@@ -404,6 +423,9 @@ job = SQLJob(creds)
|
|
|
404
423
|
### 1.1 Authenticating with Kerberos
|
|
405
424
|
If your IBM i is configured to support Kerberos authentication, you can authenticate using Kerberos instead of passing a plain-text password to the `DaemonServer` Object.
|
|
406
425
|
|
|
426
|
+
> [!NOTE]
|
|
427
|
+
> Kerberos support requires the `kerberos` extra: `pip install mapepire-python[kerberos]`. See [Optional: Kerberos authentication support](#optional-kerberos-authentication-support).
|
|
428
|
+
|
|
407
429
|
#### 1.1.1 Windows
|
|
408
430
|
|
|
409
431
|
If your Windows machine is part of a Kerberos realm and supports SSPI authentication, you can authenticate by creating the `DaemonServer` as shown below:
|
|
@@ -486,12 +508,14 @@ First create a `mapepire.ini` file in the root of your project with the followin
|
|
|
486
508
|
|
|
487
509
|
```ini title=mapepire.ini
|
|
488
510
|
[mapepire]
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
511
|
+
host=SERVER
|
|
512
|
+
port=PORT
|
|
513
|
+
user=USER
|
|
514
|
+
password=PASSWORD
|
|
493
515
|
```
|
|
494
516
|
|
|
517
|
+
> **Note:** The keys must match the `DaemonServer` fields (`host`, `port`, `user`, `password`), and values must **not** be quoted — write `host=myhost`, not `host="myhost"`.
|
|
518
|
+
|
|
495
519
|
Then you can create a `SQLJob` object by passing the path to the `.ini` file which will handle the connection details
|
|
496
520
|
|
|
497
521
|
|
|
@@ -573,7 +597,7 @@ logging.getLogger("mapepire_python").setLevel(logging.DEBUG)
|
|
|
573
597
|
|
|
574
598
|
# Usage
|
|
575
599
|
|
|
576
|
-
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all
|
|
600
|
+
Depending on your setup and use case, you can choose the most convenient way to configure the connection details. The following usage examples are compatible with all four connection options detailed above. For simplicity, we assume there is a `mapepire.ini` file in the root of the project with the connection details.
|
|
577
601
|
|
|
578
602
|
|
|
579
603
|
There are four main ways to run queries using `mapepire-python`:
|
|
@@ -3,10 +3,10 @@ websockets>=14.0
|
|
|
3
3
|
pep249abc
|
|
4
4
|
|
|
5
5
|
[dev]
|
|
6
|
-
ruff
|
|
7
|
-
mypy<
|
|
6
|
+
ruff<0.16,>=0.15
|
|
7
|
+
mypy<2.4,>=1.0
|
|
8
8
|
black<27.0,>=24.3.0
|
|
9
|
-
isort<
|
|
9
|
+
isort<8.1,>=5.12
|
|
10
10
|
pytest>=9.0.3
|
|
11
11
|
pep249abc
|
|
12
12
|
pytest-asyncio
|
|
@@ -19,7 +19,11 @@ packaging
|
|
|
19
19
|
pre-commit
|
|
20
20
|
python-dotenv
|
|
21
21
|
pytest-env
|
|
22
|
+
|
|
23
|
+
[kerberos]
|
|
24
|
+
|
|
25
|
+
[kerberos:sys_platform != "win32"]
|
|
22
26
|
gssapi
|
|
23
27
|
|
|
24
|
-
[
|
|
28
|
+
[kerberos:sys_platform == "win32"]
|
|
25
29
|
pywin32
|
|
@@ -22,7 +22,7 @@ requires-python = ">=3.10"
|
|
|
22
22
|
dependencies = [
|
|
23
23
|
"dataclasses-json>=0.6.4",
|
|
24
24
|
"websockets>=14.0",
|
|
25
|
-
"pep249abc"
|
|
25
|
+
"pep249abc",
|
|
26
26
|
]
|
|
27
27
|
license = {file = "LICENSE"}
|
|
28
28
|
|
|
@@ -33,11 +33,15 @@ Changelog = "https://github.com/Mapepire-IBMi/mapepire-python/blob/main/CHANGELO
|
|
|
33
33
|
Documentation = "https://mapepire-ibmi.github.io/"
|
|
34
34
|
|
|
35
35
|
[project.optional-dependencies]
|
|
36
|
+
kerberos = [
|
|
37
|
+
'gssapi; sys_platform != "win32"',
|
|
38
|
+
'pywin32; sys_platform == "win32"',
|
|
39
|
+
]
|
|
36
40
|
dev = [
|
|
37
|
-
"ruff",
|
|
38
|
-
"mypy>=1.0,<
|
|
41
|
+
"ruff>=0.15,<0.16",
|
|
42
|
+
"mypy>=1.0,<2.4",
|
|
39
43
|
"black>=24.3.0,<27.0",
|
|
40
|
-
"isort>=5.12,<
|
|
44
|
+
"isort>=5.12,<8.1",
|
|
41
45
|
"pytest>=9.0.3",
|
|
42
46
|
"pep249abc",
|
|
43
47
|
"pytest-asyncio",
|
|
@@ -50,8 +54,6 @@ dev = [
|
|
|
50
54
|
"pre-commit",
|
|
51
55
|
"python-dotenv",
|
|
52
56
|
"pytest-env",
|
|
53
|
-
"gssapi",
|
|
54
|
-
'pywin32; sys_platform == "win32"'
|
|
55
57
|
]
|
|
56
58
|
|
|
57
59
|
[tool.setuptools.packages.find]
|
|
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
|
|
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
|
|
File without changes
|
{mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python/pool/async_websocket_client.py
RENAMED
|
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
|
{mapepire_python-0.3.0 → mapepire_python-0.3.1}/mapepire_python.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|