You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-[1. Using the `DaemonServer` object](#1-using-the-daemonserver-object)
25
26
-[2. Passing the connection details as a dictionary](#2-passing-the-connection-details-as-a-dictionary)
26
27
-[3. Using a config file (`.ini`) to store the connection details](#3-using-a-config-file-ini-to-store-the-connection-details)
28
+
-[TLS Configuration](#tls-configuration)
27
29
-[Usage](#usage)
28
30
-[1. Using the `SQLJob` object to run queries synchronously](#1-using-the-sqljob-object-to-run-queries-synchronously)
29
31
-[Query and run](#query-and-run)
@@ -87,8 +89,34 @@ pip install mapepire-python
87
89
### Server Component Setup
88
90
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/)
89
91
90
-
91
-
# Connection options
92
+
# Quick Start
93
+
94
+
To get started with `mapepire-python`, you will need to setup a connection credentials for the Mapepire server. You can use a dictionary to store the connection details:
95
+
96
+
```python
97
+
from mapepire_python import connect
98
+
99
+
creds = {
100
+
"host": "SERVER",
101
+
"port": 8076,
102
+
"user": "USER",
103
+
"password": "PASSWORD",
104
+
}
105
+
106
+
with connect(creds) as conn:
107
+
with conn.execute("select * from sample.employee") as cursor:
108
+
result = cursor.fetchone()
109
+
print(result)
110
+
111
+
```
112
+
113
+
# Other Connection options
114
+
115
+
> [!NOTE]
116
+
> TLS support as of version 0.3.0 is now available. Server certificate verification is enabled by default. To disable certificate verification, set the `ignoreUnauthorized` field to `True` in the connection details.
117
+
> - To update run `pip install -U mapepire-python`
118
+
>
119
+
> - More info TLS Configuration [here](#tls-configuration)
92
120
93
121
There are three ways to configure mapepire server connection details using `mapepire-python`:
The `section` argument is optional and allows you to specify a specific section in the `.ini` file where the connection details are stored. This allows you to store multiple connection details to different systems in the same file. If you do not specify a `section`, the first section in the file will be used.
176
202
203
+
## TLS Configuration
204
+
205
+
Server certificate verification (`ssl.CERT_REQUIRED`) is enabled by default. To disable certificate verification, set the `ignoreUnauthorized` field to `True` in the connection details.
206
+
207
+
get the server certificate:
208
+
209
+
```python
210
+
from mapepire_python.data_types import DaemonServer
0 commit comments