python-eigen-ingenuity 0.5.7b4__tar.gz → 0.5.7b5__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.
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/PKG-INFO +1 -1
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/__init__.py +2 -2
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/assetmodel.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/auth.py +66 -42
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/core/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/elastic.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/events.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/historian.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/historianmulti.py +2 -10
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/settings.py +30 -1
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/smartdash.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/sql.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/util.py +18 -7
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/PKG-INFO +1 -1
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/MANIFEST.in +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/README-nocli.md +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/README.md +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/assetmodelbuilder.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/assetmodelcsvwriter.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/assetmodelutilities.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/configmanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/connectors/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/connectors/boltconnector.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/connectors/dbconnectors.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/connectors/genericconnector.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/connectors/httpsconnector.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/csvcontentsmanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/csvwriter.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/fileanalyser.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/filemanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/messages.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/cypherfileprocessor.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/labelmanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/nodefileprocessor.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/propertymanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/relationshipfileprocessor.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/processors/relationshipmanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/property.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/queries/__init__.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/queries/cypherbuilder.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/queries/query.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/queries/typedefs.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/versionmanager.py +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/pyproject.toml +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/SOURCES.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/dependency_links.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/entry_points.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/requires.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/python_eigen_ingenuity.egg-info/top_level.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/requirements.txt +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/setup.cfg +0 -0
- {python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/setup.py +0 -0
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/__init__.py
RENAMED
|
@@ -23,7 +23,7 @@ from eigeningenuity.events import get_eventlog
|
|
|
23
23
|
from eigeningenuity.assetmodel import get_assetmodel
|
|
24
24
|
from eigeningenuity.smartdash import get_smartdash
|
|
25
25
|
from eigeningenuity.sql import get_sql
|
|
26
|
-
from eigeningenuity.settings import set_azure_client_id,
|
|
26
|
+
from eigeningenuity.settings import set_azure_tenant_id, set_azure_client_id, set_azure_client_secret, disable_azure_auth, disable_auth_token_cache, clear_auth_token_cache, set_api_token, set_auth_scope
|
|
27
27
|
|
|
28
|
-
__all__ = ["get_historian", "get_historian_multi", "get_assetmodel", "get_elastic", "get_sql", "get_eventlog", "get_smartdash", "list_historians", "EigenServer", "set_azure_client_id", "
|
|
28
|
+
__all__ = ["get_historian", "get_historian_multi", "get_assetmodel", "get_elastic", "get_sql", "get_eventlog", "get_smartdash", "list_historians", "EigenServer", "set_azure_tenant_id", "set_azure_client_id", "set_azure_client_secret", "disable_azure_auth", "disable_auth_token_cache", "clear_auth_token_cache", "set_api_token", "set_auth_scope"]
|
|
29
29
|
__version__ = pkg_resources.require("python-eigen-ingenuity")[0].version
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/assetmodel.py
RENAMED
|
File without changes
|
|
@@ -19,6 +19,7 @@ def decrypt(data,key):
|
|
|
19
19
|
def _authenticate_azure_user(baseurl):
|
|
20
20
|
global url
|
|
21
21
|
url = baseurl
|
|
22
|
+
|
|
22
23
|
if settings._token_cache_enabled_:
|
|
23
24
|
global cache
|
|
24
25
|
try:
|
|
@@ -43,54 +44,77 @@ def _authenticate_azure_user(baseurl):
|
|
|
43
44
|
|
|
44
45
|
tenant_id = settings._azure_tenant_id_
|
|
45
46
|
client_id = settings._azure_client_id_
|
|
47
|
+
client_secret = settings._azure_client_secret_
|
|
46
48
|
authority = f'https://login.microsoftonline.com/{tenant_id}'
|
|
47
|
-
scope=[f"{baseurl}/user_impersonation"]
|
|
48
|
-
|
|
49
|
-
app = msal.PublicClientApplication(
|
|
50
|
-
client_id=client_id,
|
|
51
|
-
authority=authority,
|
|
52
|
-
token_cache=cache
|
|
53
|
-
)
|
|
54
|
-
|
|
55
|
-
result=None
|
|
56
49
|
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
50
|
+
if client_secret: # USE CLIENT_CREDENTIALS FLOW
|
|
51
|
+
scope=[f"{baseurl}/.default"]
|
|
52
|
+
# Create a confidential client application
|
|
53
|
+
app = msal.ConfidentialClientApplication(
|
|
54
|
+
client_id,
|
|
55
|
+
authority=authority,
|
|
56
|
+
client_credential=client_secret
|
|
57
|
+
)
|
|
58
|
+
|
|
59
|
+
# Acquire a token
|
|
60
|
+
result = app.acquire_token_for_client(scopes=scope)
|
|
61
|
+
|
|
62
|
+
if "access_token" in result:
|
|
63
|
+
access_token = (result["access_token"])
|
|
64
|
+
else:
|
|
65
|
+
print("Error acquiring token:")
|
|
66
|
+
print(result.get("error"))
|
|
67
|
+
print(result.get("error_description"))
|
|
68
|
+
print(result.get("correlation_id")) # You might want to save this in case of reporting a bug
|
|
69
|
+
|
|
70
|
+
else: # USE INTERACTIVE FLOW
|
|
71
|
+
|
|
72
|
+
scope=[f"{baseurl}/{settings._auth_scope_}"]
|
|
73
|
+
|
|
74
|
+
app = msal.PublicClientApplication(
|
|
75
|
+
client_id=client_id,
|
|
76
|
+
authority=authority,
|
|
77
|
+
token_cache=cache
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
# We now check the cache to see
|
|
81
|
+
# whether we already have some accounts that the end user already used to sign in before.
|
|
82
|
+
accounts = app.get_accounts()
|
|
83
|
+
if accounts:
|
|
84
|
+
account = 0
|
|
85
|
+
# If so, you could then somehow display these accounts and let end user choose
|
|
86
|
+
if len(accounts) >= 2:
|
|
87
|
+
print("Found Multiple Users in Cache")
|
|
88
|
+
while True:
|
|
89
|
+
for idx,a in enumerate(accounts):
|
|
90
|
+
print(f'{idx}: {a["username"]}')
|
|
91
|
+
try:
|
|
92
|
+
account = int(input("Enter the number of the account you want to use:\n"))
|
|
93
|
+
if account not in list(range(len(accounts))):
|
|
94
|
+
print("That is not a valid option!")
|
|
95
|
+
else:
|
|
96
|
+
break
|
|
97
|
+
except:
|
|
71
98
|
print("That is not a valid option!")
|
|
72
|
-
else:
|
|
73
|
-
break
|
|
74
|
-
except:
|
|
75
|
-
print("That is not a valid option!")
|
|
76
99
|
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
100
|
+
# Assuming the end user chose this one
|
|
101
|
+
chosen = accounts[account]
|
|
102
|
+
# Now let's try to find a token in cache for this account
|
|
103
|
+
result = app.acquire_token_silent(scope, account=chosen)
|
|
81
104
|
|
|
82
105
|
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
106
|
+
if not result:
|
|
107
|
+
# So no suitable token exists in cache. Let's get a new one from Azure AD.
|
|
108
|
+
settings.clear_auth_token_cache()
|
|
109
|
+
result = app.acquire_token_interactive(scope,auth_uri_callback=_backup_auth_azure_user)
|
|
87
110
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
111
|
+
if "access_token" in result:
|
|
112
|
+
access_token = (result["access_token"]) # Yay!
|
|
113
|
+
else:
|
|
114
|
+
print("Error acquiring token:")
|
|
115
|
+
print(result.get("error"))
|
|
116
|
+
print(result.get("error_description"))
|
|
117
|
+
print(result.get("correlation_id")) # You may need this when reporting a bug
|
|
94
118
|
|
|
95
119
|
# Make requests to the Java API using the obtained access token
|
|
96
120
|
return {
|
|
@@ -127,7 +151,7 @@ def _backup_auth_azure_user(_uri):
|
|
|
127
151
|
|
|
128
152
|
|
|
129
153
|
authority = f'https://login.microsoftonline.com/{settings._azure_tenant_id_}'
|
|
130
|
-
scope=[f"{baseurl}/
|
|
154
|
+
scope=[f"{baseurl}/{settings._auth_scope_}"]
|
|
131
155
|
client_id = settings._azure_client_id_
|
|
132
156
|
|
|
133
157
|
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/core/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/historian.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/historianmulti.py
RENAMED
|
@@ -17,11 +17,7 @@ eigeningenuity.core) or a full URL to a JSON Bridge Historian instance.
|
|
|
17
17
|
print(asctime(time.gmtime(dp['timestamp'])), dp['value'])
|
|
18
18
|
"""
|
|
19
19
|
|
|
20
|
-
import
|
|
21
|
-
import math
|
|
22
|
-
import logging
|
|
23
|
-
import csv
|
|
24
|
-
import requests
|
|
20
|
+
import requests, warnings
|
|
25
21
|
from urllib.parse import quote as urlquote
|
|
26
22
|
from typing import Union
|
|
27
23
|
from datetime import datetime
|
|
@@ -32,10 +28,6 @@ from eigeningenuity.core import get_default_server, EigenServer
|
|
|
32
28
|
from eigeningenuity.util import force_list, time_to_epoch_millis, EigenException, \
|
|
33
29
|
multi_response_to_df, merge_tags_from_response, update_keys, _do_historian_multi_request, format_output
|
|
34
30
|
|
|
35
|
-
from urllib3.exceptions import InsecureRequestWarning
|
|
36
|
-
requests.packages.urllib3.disable_warnings(category=InsecureRequestWarning)
|
|
37
|
-
|
|
38
|
-
|
|
39
31
|
class HistorianMulti (object):
|
|
40
32
|
"""A Historian which talks the Eigen Historian Json Bridge protocol.
|
|
41
33
|
"""
|
|
@@ -460,7 +452,7 @@ def createPoint(value:Union[int,float],timestamp:Union[int,str,datetime],status:
|
|
|
460
452
|
raise EigenException("Bad Status Parameter, must be 'OK' or 'BAD'")
|
|
461
453
|
return {"value": value, "timestamp": timestamp, "status": status}
|
|
462
454
|
|
|
463
|
-
def get_historian_multi(eigenserver
|
|
455
|
+
def get_historian_multi(eigenserver = None, default_historian = None) -> HistorianMulti:
|
|
464
456
|
"""Instantiate a historian object for the given instance.
|
|
465
457
|
|
|
466
458
|
Args:
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/settings.py
RENAMED
|
@@ -5,7 +5,9 @@ _token_cache_enabled_ = True
|
|
|
5
5
|
_azure_auth_enabled_ = True
|
|
6
6
|
_azure_tenant_id_ = os.getenv("EIGEN_INGENUITY_TENANT_ID", "74efa022-e6d6-42ad-bc15-edc76c525bde")
|
|
7
7
|
_azure_client_id_ = os.getenv("EIGEN_INGENUITY_CLIENT_ID", "c2b9aa13-e178-4dde-bc2c-b6cc4c8391d2")
|
|
8
|
+
_azure_client_secret_ = os.getenv("EIGEN_INGENUITY_CLIENT_SECRET", None)
|
|
8
9
|
_api_token_value_ = os.getenv("EIGEN_INGENUITY_API_TOKEN", False)
|
|
10
|
+
_auth_scope_ = os.getenv("EIGEN_INGNEUITY_AUTH_SCOPE","user_impersonation")
|
|
9
11
|
|
|
10
12
|
|
|
11
13
|
def clear_auth_token_cache():
|
|
@@ -65,7 +67,7 @@ def set_azure_client_id(id):
|
|
|
65
67
|
Set the Client ID of the App registration for the eigenserver. This value required for Azure authentication, but the use of the EIGEN_INGENUITY_TENANT_ID environmental variable can be used as an alternative way of setting it.
|
|
66
68
|
|
|
67
69
|
Args:
|
|
68
|
-
id: The ID of your
|
|
70
|
+
id: The ID of your service principal in Azure. This can be found at portal.azure.com. (Default points to our DEMO Instance)
|
|
69
71
|
|
|
70
72
|
Returns:
|
|
71
73
|
None
|
|
@@ -73,6 +75,19 @@ def set_azure_client_id(id):
|
|
|
73
75
|
global _azure_client_id_
|
|
74
76
|
_azure_client_id_ = id
|
|
75
77
|
|
|
78
|
+
def set_azure_client_secret(secret):
|
|
79
|
+
"""
|
|
80
|
+
Set the Client ID of the App registration for the eigenserver. This value required for Azure authentication via CLIENT_CREDENTIALS flow, but not for the USER_CREDENTIALS flow, but the use of the EIGEN_INGENUITY_CLIENT_SECRET environmental variable can be used as an alternative way of setting it.
|
|
81
|
+
|
|
82
|
+
Args:
|
|
83
|
+
secret: The value of the client secret of your service principal in Azure. This can be found at portal.azure.com. (Default points to our DEMO Instance)
|
|
84
|
+
|
|
85
|
+
Returns:
|
|
86
|
+
None
|
|
87
|
+
"""
|
|
88
|
+
global _azure_client_secret_
|
|
89
|
+
_azure_client_secret_ = secret
|
|
90
|
+
|
|
76
91
|
def set_api_token(token):
|
|
77
92
|
"""
|
|
78
93
|
Set the API token for the eigenserver. This value is required to access our secured endpoints, but the use of the EIGEN_INGENUITY_API_TOKEN environmental variable can be used as an alternative way of setting it.
|
|
@@ -85,3 +100,17 @@ def set_api_token(token):
|
|
|
85
100
|
"""
|
|
86
101
|
global _api_token_value_
|
|
87
102
|
_api_token_value_ = token
|
|
103
|
+
|
|
104
|
+
def set_auth_scope(scope):
|
|
105
|
+
"""
|
|
106
|
+
Set the Scope to be requested from the Azure App registration. This is only required if your IT has implemented a non-standard scope.
|
|
107
|
+
This value must match the one configured in the eigen dashboards app registration in your Azure, if you are unsure of what is should be, ask yoeu system administrator. The use of the EIGEN_INGENUITY_AUTH_SCOPE environmental variable can be used as an alternative way of setting it.
|
|
108
|
+
|
|
109
|
+
Args:
|
|
110
|
+
scope: The value of the required scope. Defaults to 'user_impersonation'.
|
|
111
|
+
|
|
112
|
+
Returns:
|
|
113
|
+
None
|
|
114
|
+
"""
|
|
115
|
+
global _auth_scope_
|
|
116
|
+
_auth_scope_ = scope
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/eigeningenuity/smartdash.py
RENAMED
|
File without changes
|
|
File without changes
|
|
@@ -1,5 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import sys, os, json, time, requests, csv, logging
|
|
1
|
+
import sys, os, json, time, requests, csv, logging, warnings
|
|
3
2
|
from datetime import datetime
|
|
4
3
|
from dateparser import parse
|
|
5
4
|
import pandas as pd
|
|
@@ -11,6 +10,13 @@ from requests.exceptions import ConnectionError
|
|
|
11
10
|
from eigeningenuity.auth import _authenticate_azure_user
|
|
12
11
|
import eigeningenuity.settings as settings
|
|
13
12
|
|
|
13
|
+
from urllib3.exceptions import InsecureRequestWarning
|
|
14
|
+
|
|
15
|
+
# Suppress only the single InsecureRequestWarning from urllib3
|
|
16
|
+
warnings.simplefilter('ignore', InsecureRequestWarning)
|
|
17
|
+
# Suppress only the single InsecureRequestWarning from urllib3
|
|
18
|
+
requests.packages.urllib3.disable_warnings(InsecureRequestWarning)
|
|
19
|
+
|
|
14
20
|
def _do_eigen_json_request(requesturl,auth,**params):
|
|
15
21
|
|
|
16
22
|
headers = {}
|
|
@@ -516,11 +522,16 @@ def _reformat_multi_response(original_dict):
|
|
|
516
522
|
reformatted_dict = {}
|
|
517
523
|
|
|
518
524
|
for key, value in original_dict.items():
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
525
|
+
if type(value) == list:
|
|
526
|
+
reformatted_dict = value
|
|
527
|
+
elif key == "dataPoint" or key == "dataPoints":
|
|
528
|
+
reformatted_dict = value
|
|
529
|
+
else:
|
|
530
|
+
# Extract the list of data points from either 'dataPoints' or 'dataPoint' key
|
|
531
|
+
data_points = value.get('dataPoints') or value.get('dataPoint') or value
|
|
532
|
+
# Assign the data points list directly to the top-level key
|
|
533
|
+
reformatted_dict[key] = data_points
|
|
534
|
+
|
|
524
535
|
return reformatted_dict
|
|
525
536
|
|
|
526
537
|
def format_output(output,response,tags,timestamps=False):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/configmanager.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/csvwriter.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/fileanalyser.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/filemanager.py
RENAMED
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/messages.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
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/property.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/queries/query.py
RENAMED
|
File without changes
|
|
File without changes
|
{python_eigen_ingenuity-0.5.7b4 → python_eigen_ingenuity-0.5.7b5}/modelbuilder/src/versionmanager.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
|
|
File without changes
|