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
Copy file name to clipboardExpand all lines: dimcli/__init__.py
+10-3Lines changed: 10 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -45,6 +45,7 @@ def login( username="",
45
45
endpoint="",
46
46
instance="",
47
47
key="",
48
+
verify_ssl=True,
48
49
verbose=True):
49
50
"""Login into the Dimensions API and store the query token in memory.
50
51
@@ -68,6 +69,8 @@ def login( username="",
68
69
The instance name, from the local dsl.ini credentials file. Default: 'live'
69
70
key: str, optional
70
71
The API key (available to some users instead of username/password)
72
+
verify_ssl: bool, optional
73
+
Verify SSL certificates for HTTPS requests. Default: True.
71
74
verbose: bool, optional
72
75
Verbose mode. Default: True.
73
76
@@ -81,6 +84,10 @@ def login( username="",
81
84
* `https://app.dimensions.ai/api/dsl/v2`
82
85
83
86
87
+
About SSL verification:
88
+
89
+
Dimcli internally uses the Requests library, which verifies SSL certificates for HTTPS requests, just like a web browser. For some users, it is necessary to turn off SSL verification in order to connect to the API. This can be achieved by passing `verify_ssl=False` at login time. All subsequent API queries will not use SSL verification. NOTE This setting can also be added to the `dsl.ini` file with the following line: `verify_ssl=false`.
90
+
84
91
85
92
Example
86
93
-------
@@ -94,11 +101,11 @@ def login( username="",
94
101
95
102
You can specify endpoint, which by default is set to "https://app.dimensions.ai"
<spanclass="sd"> Dimcli internally uses the Requests library, which verifies SSL certificates for HTTPS requests, just like a web browser. For some users, it is necessary to turn off SSL verification in order to connect to the API. This can be achieved by passing `verify_ssl=False` at login time. All subsequent API queries will not use SSL verification. NOTE This setting can also be added to the `dsl.ini` file with the following line: `verify_ssl=false`.</span>
157
+
151
158
152
159
<spanclass="sd"> Example</span>
153
160
<spanclass="sd"> -------</span>
@@ -161,11 +168,11 @@ <h1>Source code for dimcli.__init__</h1><div class="highlight"><pre>
161
168
162
169
<spanclass="sd"> You can specify endpoint, which by default is set to "https://app.dimensions.ai"</span>
<spanclass="n">printDebug</span><spanclass="p">(</span><spanclass="s2">"Login failed: please ensure your credentials are correct."</span><spanclass="p">)</span>
0 commit comments