nacwrap 0.3.2__tar.gz → 0.3.3__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.
- {nacwrap-0.3.2/nacwrap.egg-info → nacwrap-0.3.3}/PKG-INFO +1 -1
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/instances.py +1 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/tasks.py +14 -10
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/users.py +5 -2
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/workflows.py +5 -1
- {nacwrap-0.3.2 → nacwrap-0.3.3/nacwrap.egg-info}/PKG-INFO +1 -1
- {nacwrap-0.3.2 → nacwrap-0.3.3}/setup.py +1 -1
- {nacwrap-0.3.2 → nacwrap-0.3.3}/LICENSE +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/MANIFEST.in +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/README.md +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/__init__.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/_auth.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/_helpers.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/connections.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/data_model.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/datasources.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap/exceptions.py +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap.egg-info/SOURCES.txt +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap.egg-info/dependency_links.txt +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap.egg-info/requires.txt +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/nacwrap.egg-info/top_level.txt +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/requirements.txt +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/setup.cfg +0 -0
- {nacwrap-0.3.2 → nacwrap-0.3.3}/tests/test.py +0 -0
|
@@ -7,6 +7,7 @@ import os
|
|
|
7
7
|
from datetime import date
|
|
8
8
|
|
|
9
9
|
import requests
|
|
10
|
+
|
|
10
11
|
from nacwrap._auth import Decorators
|
|
11
12
|
from nacwrap._helpers import _basic_retry, _fetch_page, _put
|
|
12
13
|
from nacwrap.data_model import NintexTask, TaskStatus
|
|
@@ -40,10 +41,9 @@ def task_delegate(assignmentId: str, taskId: str, assignees: list[str], message:
|
|
|
40
41
|
url,
|
|
41
42
|
headers={
|
|
42
43
|
"Authorization": "Bearer " + os.environ["NTX_BEARER_TOKEN"],
|
|
43
|
-
"
|
|
44
|
+
"Accept": "application/json",
|
|
44
45
|
},
|
|
45
|
-
|
|
46
|
-
data=data,
|
|
46
|
+
json=data,
|
|
47
47
|
)
|
|
48
48
|
response.raise_for_status()
|
|
49
49
|
|
|
@@ -54,7 +54,8 @@ def task_delegate(assignmentId: str, taskId: str, assignees: list[str], message:
|
|
|
54
54
|
raise Exception(
|
|
55
55
|
f"HTTP Error when delegating task: {e.response.status_code} - {e.response.content}"
|
|
56
56
|
)
|
|
57
|
-
|
|
57
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
58
|
+
raise
|
|
58
59
|
except requests.exceptions.RequestException as e:
|
|
59
60
|
logger.error(f"Error, could not delegate task: {e}")
|
|
60
61
|
raise Exception(f"Error, could not delegate task: {e}")
|
|
@@ -130,7 +131,8 @@ def task_search(
|
|
|
130
131
|
raise Exception(
|
|
131
132
|
f"Error, could not get instance data: {e.response.status_code} - {e.response.content}"
|
|
132
133
|
)
|
|
133
|
-
|
|
134
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
135
|
+
raise
|
|
134
136
|
except requests.exceptions.RequestException as e:
|
|
135
137
|
logger.error(f"Error, could not get instance data: {e}")
|
|
136
138
|
raise Exception(f"Error, could not get instance data: {e}")
|
|
@@ -196,7 +198,7 @@ def task_get(task_id: str) -> dict:
|
|
|
196
198
|
url,
|
|
197
199
|
headers={
|
|
198
200
|
"Authorization": "Bearer " + os.environ["NTX_BEARER_TOKEN"],
|
|
199
|
-
"
|
|
201
|
+
"Accept": "application/json",
|
|
200
202
|
},
|
|
201
203
|
)
|
|
202
204
|
response.raise_for_status()
|
|
@@ -208,7 +210,8 @@ def task_get(task_id: str) -> dict:
|
|
|
208
210
|
raise Exception(
|
|
209
211
|
f"HTTP Error when getting task: {e.response.status_code} - {e.response.content}"
|
|
210
212
|
)
|
|
211
|
-
|
|
213
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
214
|
+
raise
|
|
212
215
|
except requests.exceptions.RequestException as e:
|
|
213
216
|
logger.error(f"Error, could not get task: {e}")
|
|
214
217
|
raise Exception(f"Error, could not get task: {e}")
|
|
@@ -235,9 +238,9 @@ def task_complete(task_id: str, assignment_id: str, outcome: str):
|
|
|
235
238
|
url,
|
|
236
239
|
headers={
|
|
237
240
|
"Authorization": "Bearer " + os.environ["NTX_BEARER_TOKEN"],
|
|
238
|
-
"
|
|
241
|
+
"Accept": "application/json",
|
|
239
242
|
},
|
|
240
|
-
|
|
243
|
+
json={"outcome": outcome},
|
|
241
244
|
)
|
|
242
245
|
response.raise_for_status()
|
|
243
246
|
except requests.exceptions.HTTPError as e:
|
|
@@ -247,7 +250,8 @@ def task_complete(task_id: str, assignment_id: str, outcome: str):
|
|
|
247
250
|
raise Exception(
|
|
248
251
|
f"HTTP Error when completing task: {e.response.status_code} - {e.response.content}"
|
|
249
252
|
)
|
|
250
|
-
|
|
253
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
254
|
+
raise
|
|
251
255
|
except requests.exceptions.RequestException as e:
|
|
252
256
|
logger.error(f"Error, could not complete task: {e}")
|
|
253
257
|
raise Exception(f"Error, could not complete task: {e}")
|
|
@@ -6,6 +6,7 @@ import logging
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
|
+
|
|
9
10
|
from nacwrap._auth import Decorators
|
|
10
11
|
from nacwrap._helpers import _delete, _fetch_page
|
|
11
12
|
from nacwrap.data_model import NintexUser
|
|
@@ -41,7 +42,8 @@ def user_delete(id: str):
|
|
|
41
42
|
raise Exception(
|
|
42
43
|
f"Error, user not found when deleting: {e.response.status_code} - {e.response.content}"
|
|
43
44
|
)
|
|
44
|
-
|
|
45
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
46
|
+
raise
|
|
45
47
|
except requests.exceptions.RequestException as e:
|
|
46
48
|
logger.error(f"Error, could not get instance data: {e}")
|
|
47
49
|
raise Exception(f"Error, could not get instance data: {e}")
|
|
@@ -107,7 +109,8 @@ def users_list(
|
|
|
107
109
|
raise Exception(
|
|
108
110
|
f"Error, could not get user data: {e.response.status_code} - {e.response.content}"
|
|
109
111
|
)
|
|
110
|
-
|
|
112
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
113
|
+
raise
|
|
111
114
|
except requests.exceptions.RequestException as e:
|
|
112
115
|
logger.error(f"Error, could not get user data: {e}")
|
|
113
116
|
raise Exception(f"Error, could not get user data: {e}")
|
|
@@ -6,6 +6,7 @@ import logging
|
|
|
6
6
|
import os
|
|
7
7
|
|
|
8
8
|
import requests
|
|
9
|
+
|
|
9
10
|
from nacwrap._auth import Decorators
|
|
10
11
|
from nacwrap._helpers import _fetch_page
|
|
11
12
|
from nacwrap.data_model import NintexWorkflows
|
|
@@ -15,7 +16,7 @@ logger = logging.getLogger(__name__)
|
|
|
15
16
|
|
|
16
17
|
|
|
17
18
|
@Decorators.refresh_token
|
|
18
|
-
def workflows_list(limit: int = 1000) -> dict:
|
|
19
|
+
def workflows_list(limit: int = 1000) -> list[dict]:
|
|
19
20
|
"""Get Nintex Workflow information.
|
|
20
21
|
|
|
21
22
|
Args:
|
|
@@ -40,6 +41,7 @@ def workflows_list(limit: int = 1000) -> dict:
|
|
|
40
41
|
url,
|
|
41
42
|
headers={
|
|
42
43
|
"Authorization": "Bearer " + os.environ["NTX_BEARER_TOKEN"],
|
|
44
|
+
"Accept": "application/json",
|
|
43
45
|
"Content-Type": "application/json",
|
|
44
46
|
},
|
|
45
47
|
)
|
|
@@ -51,6 +53,8 @@ def workflows_list(limit: int = 1000) -> dict:
|
|
|
51
53
|
raise WorkflowApiError(
|
|
52
54
|
f"Error, could not get workflow data: {e.response.status_code} - {e.response.content}"
|
|
53
55
|
)
|
|
56
|
+
except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
|
|
57
|
+
raise
|
|
54
58
|
except requests.exceptions.RequestException as e:
|
|
55
59
|
logger.error(f"Error, could not get workflow data: {e}")
|
|
56
60
|
raise WorkflowApiError(f"Error, could not get workflow data: {e}")
|
|
@@ -8,7 +8,7 @@ with open("README.md", "r") as f:
|
|
|
8
8
|
|
|
9
9
|
setup(
|
|
10
10
|
name="nacwrap",
|
|
11
|
-
version="0.3.
|
|
11
|
+
version="0.3.3",
|
|
12
12
|
description="Python package that acts as a wrapper for the Nintex Automation Cloud system.",
|
|
13
13
|
long_description=long_description,
|
|
14
14
|
long_description_content_type="text/markdown",
|
|
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
|