nacwrap 0.2.3__tar.gz → 0.2.4__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.
Files changed (25) hide show
  1. {nacwrap-0.2.3/nacwrap.egg-info → nacwrap-0.2.4}/PKG-INFO +3 -2
  2. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/connections.py +4 -0
  3. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/datasources.py +7 -0
  4. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/instances.py +19 -5
  5. {nacwrap-0.2.3 → nacwrap-0.2.4/nacwrap.egg-info}/PKG-INFO +3 -2
  6. {nacwrap-0.2.3 → nacwrap-0.2.4}/setup.py +1 -1
  7. {nacwrap-0.2.3 → nacwrap-0.2.4}/LICENSE +0 -0
  8. {nacwrap-0.2.3 → nacwrap-0.2.4}/MANIFEST.in +0 -0
  9. {nacwrap-0.2.3 → nacwrap-0.2.4}/README.md +0 -0
  10. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/__init__.py +0 -0
  11. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/_auth.py +0 -0
  12. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/_helpers.py +0 -0
  13. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/data_model.py +0 -0
  14. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/exceptions.py +0 -0
  15. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/nacwrap.py +0 -0
  16. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/tasks.py +0 -0
  17. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/users.py +0 -0
  18. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap/workflows.py +0 -0
  19. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap.egg-info/SOURCES.txt +0 -0
  20. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap.egg-info/dependency_links.txt +0 -0
  21. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap.egg-info/requires.txt +0 -0
  22. {nacwrap-0.2.3 → nacwrap-0.2.4}/nacwrap.egg-info/top_level.txt +0 -0
  23. {nacwrap-0.2.3 → nacwrap-0.2.4}/requirements.txt +0 -0
  24. {nacwrap-0.2.3 → nacwrap-0.2.4}/setup.cfg +0 -0
  25. {nacwrap-0.2.3 → nacwrap-0.2.4}/tests/test.py +0 -0
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: nacwrap
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Python package that acts as a wrapper for the Nintex Automation Cloud system.
5
5
  Home-page: https://github.com/pepsimidamerica/nacwrap
6
6
  Author: Jordan Maynor
@@ -20,6 +20,7 @@ Dynamic: classifier
20
20
  Dynamic: description
21
21
  Dynamic: description-content-type
22
22
  Dynamic: home-page
23
+ Dynamic: license-file
23
24
  Dynamic: requires-dist
24
25
  Dynamic: requires-python
25
26
  Dynamic: summary
@@ -3,8 +3,10 @@ import os
3
3
  import requests
4
4
 
5
5
  from nacwrap._auth import Decorators
6
+ from nacwrap._helpers import _basic_retry
6
7
 
7
8
 
9
+ @_basic_retry
8
10
  @Decorators.refresh_token
9
11
  def get_connections() -> list[dict]:
10
12
  """
@@ -25,6 +27,8 @@ def get_connections() -> list[dict]:
25
27
  raise Exception(
26
28
  f"Error getting connections: {e.response.status_code} - {e.response.content}"
27
29
  )
30
+ except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
31
+ raise
28
32
  except requests.exceptions.RequestException as e:
29
33
  raise Exception(f"Error getting connections: {e}")
30
34
 
@@ -7,8 +7,10 @@ import os
7
7
  import requests
8
8
 
9
9
  from nacwrap._auth import Decorators
10
+ from nacwrap._helpers import _basic_retry
10
11
 
11
12
 
13
+ @_basic_retry
12
14
  @Decorators.refresh_token
13
15
  def get_datasources() -> dict:
14
16
  """
@@ -29,12 +31,15 @@ def get_datasources() -> dict:
29
31
  raise Exception(
30
32
  f"Error getting data sources: {e.response.status_code} - {e.response.content}"
31
33
  )
34
+ except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
35
+ raise
32
36
  except requests.exceptions.RequestException as e:
33
37
  raise Exception(f"Error getting data sources: {e}")
34
38
 
35
39
  return response.json().get("datasources", [])
36
40
 
37
41
 
42
+ @_basic_retry
38
43
  @Decorators.refresh_token
39
44
  def get_datasource_connectors() -> dict:
40
45
  """
@@ -55,6 +60,8 @@ def get_datasource_connectors() -> dict:
55
60
  raise Exception(
56
61
  f"Error getting data source connectors: {e.response.status_code} - {e.response.content}"
57
62
  )
63
+ except (requests.exceptions.ConnectionError, requests.exceptions.Timeout) as e:
64
+ raise
58
65
  except requests.exceptions.RequestException as e:
59
66
  raise Exception(f"Error getting data source connectors: {e}")
60
67
 
@@ -1,15 +1,21 @@
1
1
  import json
2
2
  import os
3
3
  from datetime import datetime
4
- from typing import Literal, Optional, Union
4
+ from typing import List, Literal, Optional, Union
5
5
 
6
6
  import requests
7
7
 
8
8
  from nacwrap._auth import Decorators
9
- from nacwrap._helpers import _fetch_page, _post
10
- from nacwrap.data_model import *
9
+ from nacwrap._helpers import _basic_retry, _fetch_page, _post
10
+ from nacwrap.data_model import (
11
+ InstanceActions,
12
+ InstanceStartData,
13
+ NintexInstance,
14
+ ResolveType,
15
+ )
11
16
 
12
17
 
18
+ @_basic_retry
13
19
  @Decorators.refresh_token
14
20
  def create_instance(workflow_id: str, start_data: Optional[dict] = None) -> dict:
15
21
  """
@@ -43,12 +49,15 @@ def create_instance(workflow_id: str, start_data: Optional[dict] = None) -> dict
43
49
  raise Exception(
44
50
  f"Error creating instance for {start_data}: {e.response.status_code} - {e.response.content}"
45
51
  )
52
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
53
+ raise
46
54
  except requests.exceptions.RequestException as e:
47
55
  raise Exception(f"Error creating instance for {start_data}: {e}")
48
56
 
49
57
  return response.json()
50
58
 
51
59
 
60
+ @_basic_retry
52
61
  @Decorators.refresh_token
53
62
  def instance_get(instanceId: str) -> dict:
54
63
  """
@@ -90,7 +99,8 @@ def instance_get(instanceId: str) -> dict:
90
99
  raise Exception(
91
100
  f"Error, could not get instance data: {e.response.status_code} - {e.response.content}"
92
101
  )
93
-
102
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
103
+ raise
94
104
  except requests.exceptions.RequestException as e:
95
105
  raise Exception(f"Error, could not get instance data: {e}")
96
106
 
@@ -184,7 +194,9 @@ def instances_list(
184
194
  "from": (
185
195
  from_datetime.strftime("%Y-%m-%dT%H:%M:%S.%fZ") if from_datetime else None
186
196
  ),
187
- "to": to_datetime.strftime("%Y-%m-%dT23:59:59.0000000Z") if to_datetime else None,
197
+ "to": to_datetime.strftime("%Y-%m-%dT23:59:59.0000000Z")
198
+ if to_datetime
199
+ else None,
188
200
  "pageSize": page_size,
189
201
  }
190
202
 
@@ -217,6 +229,8 @@ def instances_list(
217
229
  raise Exception(
218
230
  f"Error, could not get instance data: {e.response.status_code} - {e.response.content}"
219
231
  )
232
+ except (requests.exceptions.Timeout, requests.exceptions.ConnectionError) as e:
233
+ raise
220
234
  except requests.exceptions.RequestException as e:
221
235
  raise Exception(f"Error, could not get instance data: {e}")
222
236
 
@@ -1,6 +1,6 @@
1
- Metadata-Version: 2.2
1
+ Metadata-Version: 2.4
2
2
  Name: nacwrap
3
- Version: 0.2.3
3
+ Version: 0.2.4
4
4
  Summary: Python package that acts as a wrapper for the Nintex Automation Cloud system.
5
5
  Home-page: https://github.com/pepsimidamerica/nacwrap
6
6
  Author: Jordan Maynor
@@ -20,6 +20,7 @@ Dynamic: classifier
20
20
  Dynamic: description
21
21
  Dynamic: description-content-type
22
22
  Dynamic: home-page
23
+ Dynamic: license-file
23
24
  Dynamic: requires-dist
24
25
  Dynamic: requires-python
25
26
  Dynamic: summary
@@ -8,7 +8,7 @@ with open("README.md", "r") as f:
8
8
 
9
9
  setup(
10
10
  name="nacwrap",
11
- version="0.2.3",
11
+ version="0.2.4",
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