brynq-sdk-brynq 3.0.4__tar.gz → 3.0.5__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.
Potentially problematic release.
This version of brynq-sdk-brynq might be problematic. Click here for more details.
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/PKG-INFO +1 -1
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/brynq.py +6 -6
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/credentials.py +2 -2
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/customers.py +3 -3
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/interfaces.py +9 -9
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/mappings.py +1 -1
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/organization_chart.py +9 -9
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/roles.py +9 -9
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/source_systems.py +7 -7
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/users.py +14 -14
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/PKG-INFO +1 -1
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/setup.py +1 -1
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/__init__.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/__init__.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/credentials.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/customers.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/interfaces.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/organization_chart.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/roles.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/users.py +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/SOURCES.txt +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/dependency_links.txt +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/not-zip-safe +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/requires.txt +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/top_level.txt +0 -0
- {brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/setup.cfg +0 -0
|
@@ -29,17 +29,17 @@ class BrynQ:
|
|
|
29
29
|
|
|
30
30
|
self.url = 'https://app.brynq-staging.com/api/v2/' if self.environment == 'dev' else 'https://app.brynq.com/api/v2/'
|
|
31
31
|
|
|
32
|
-
# Initialize session with retry strategy
|
|
33
|
-
self.
|
|
32
|
+
# Initialize session with retry strategy. This is called brynq_session and not session as to not conflict with other SDKs that use self.session
|
|
33
|
+
self.brynq_session = requests.Session()
|
|
34
34
|
retry_strategy = Retry(
|
|
35
35
|
total=3, # number of retries
|
|
36
36
|
backoff_factor=0.5, # wait 0.5s * (2 ** (retry - 1)) between retries
|
|
37
37
|
status_forcelist=[500, 502, 503, 504] # HTTP status codes to retry on
|
|
38
38
|
)
|
|
39
39
|
adapter = HTTPAdapter(max_retries=retry_strategy)
|
|
40
|
-
self.
|
|
41
|
-
self.
|
|
42
|
-
self.
|
|
40
|
+
self.brynq_session.mount("http://", adapter)
|
|
41
|
+
self.brynq_session.mount("https://", adapter)
|
|
42
|
+
self.brynq_session.headers.update(self._get_headers())
|
|
43
43
|
|
|
44
44
|
# Initialize components
|
|
45
45
|
self.users = Users(self)
|
|
@@ -281,4 +281,4 @@ class BrynQ:
|
|
|
281
281
|
def close(self):
|
|
282
282
|
"""Close the session and cleanup resources"""
|
|
283
283
|
if hasattr(self, 'session'):
|
|
284
|
-
self.
|
|
284
|
+
self.brynq_session.close()
|
|
@@ -24,7 +24,7 @@ class Credentials:
|
|
|
24
24
|
DEPRECATED: Use brynq.interfaces.credentials.get() instead
|
|
25
25
|
"""
|
|
26
26
|
warnings.warn("This function is deprecated and will be removed in a future version.", DeprecationWarning, stacklevel=2)
|
|
27
|
-
response = self._brynq.
|
|
27
|
+
response = self._brynq.brynq_session.get(
|
|
28
28
|
url=f'{self._brynq.url}apps/{system}',
|
|
29
29
|
timeout=self._brynq.timeout
|
|
30
30
|
)
|
|
@@ -143,7 +143,7 @@ class Credentials:
|
|
|
143
143
|
ValueError: If the response data is invalid.
|
|
144
144
|
requests.exceptions.RequestException: If the API request fails.
|
|
145
145
|
"""
|
|
146
|
-
response = self._brynq.
|
|
146
|
+
response = self._brynq.brynq_session.get(
|
|
147
147
|
url=f'{self._brynq.url}interfaces/{interface_id}/config/auth',
|
|
148
148
|
timeout=self._brynq.timeout
|
|
149
149
|
)
|
|
@@ -25,7 +25,7 @@ class Customers:
|
|
|
25
25
|
requests.exceptions.RequestException: If the API request fails
|
|
26
26
|
ValueError: If the response data doesn't match the expected schema
|
|
27
27
|
"""
|
|
28
|
-
response = self.brynq.
|
|
28
|
+
response = self.brynq.brynq_session.get(
|
|
29
29
|
url=f"{self.brynq.url}customers",
|
|
30
30
|
timeout=self.brynq.timeout
|
|
31
31
|
)
|
|
@@ -48,7 +48,7 @@ class Customers:
|
|
|
48
48
|
requests.exceptions.RequestException: If the API request fails
|
|
49
49
|
ValueError: If the response data doesn't match the expected schema
|
|
50
50
|
"""
|
|
51
|
-
response = self.brynq.
|
|
51
|
+
response = self.brynq.brynq_session.get(
|
|
52
52
|
f"{self.brynq.url}customers/contract-details",
|
|
53
53
|
timeout=self.brynq.timeout
|
|
54
54
|
)
|
|
@@ -74,7 +74,7 @@ class Customers:
|
|
|
74
74
|
ValueError: If the response data is invalid.
|
|
75
75
|
requests.exceptions.RequestException: If the API request fails.
|
|
76
76
|
"""
|
|
77
|
-
response = self.brynq.
|
|
77
|
+
response = self.brynq.brynq_session.get(
|
|
78
78
|
f"{self.brynq.url}customers/{customer_id}/contract-details",
|
|
79
79
|
timeout=self.brynq.timeout
|
|
80
80
|
)
|
|
@@ -35,7 +35,7 @@ class Interfaces:
|
|
|
35
35
|
ValueError: If the response data is invalid
|
|
36
36
|
requests.exceptions.RequestException: If the API request fails
|
|
37
37
|
"""
|
|
38
|
-
response = self._brynq.
|
|
38
|
+
response = self._brynq.brynq_session.get(
|
|
39
39
|
f"{self._brynq.url}interfaces",
|
|
40
40
|
timeout=self._brynq.timeout
|
|
41
41
|
)
|
|
@@ -70,7 +70,7 @@ class Interfaces:
|
|
|
70
70
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
71
71
|
raise ValueError("interface_id must be a positive integer")
|
|
72
72
|
|
|
73
|
-
response = self._brynq.
|
|
73
|
+
response = self._brynq.brynq_session.get(
|
|
74
74
|
f"{self._brynq.url}interfaces/{interface_id}",
|
|
75
75
|
timeout=self._brynq.timeout
|
|
76
76
|
)
|
|
@@ -102,7 +102,7 @@ class Interfaces:
|
|
|
102
102
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
103
103
|
raise ValueError("interface_id must be a positive integer")
|
|
104
104
|
|
|
105
|
-
response = self._brynq.
|
|
105
|
+
response = self._brynq.brynq_session.get(
|
|
106
106
|
f"{self._brynq.url}interfaces/{interface_id}/config",
|
|
107
107
|
timeout=self._brynq.timeout
|
|
108
108
|
)
|
|
@@ -128,7 +128,7 @@ class Interfaces:
|
|
|
128
128
|
Raises:
|
|
129
129
|
requests.exceptions.RequestException: If the API request fails
|
|
130
130
|
"""
|
|
131
|
-
response = self._brynq.
|
|
131
|
+
response = self._brynq.brynq_session.get(
|
|
132
132
|
url=f'{self._brynq.url}interfaces/{interface_id}/config/flush',
|
|
133
133
|
timeout=self._brynq.timeout
|
|
134
134
|
)
|
|
@@ -148,7 +148,7 @@ class Interfaces:
|
|
|
148
148
|
Raises:
|
|
149
149
|
requests.exceptions.RequestException: If the API request fails
|
|
150
150
|
"""
|
|
151
|
-
response = self._brynq.
|
|
151
|
+
response = self._brynq.brynq_session.get(
|
|
152
152
|
url=f'{self._brynq.url}interfaces/{interface_id}/config/dataflows',
|
|
153
153
|
timeout=self._brynq.timeout
|
|
154
154
|
)
|
|
@@ -181,7 +181,7 @@ class Interfaces:
|
|
|
181
181
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
182
182
|
raise ValueError("interface_id must be a positive integer")
|
|
183
183
|
|
|
184
|
-
response = self._brynq.
|
|
184
|
+
response = self._brynq.brynq_session.get(
|
|
185
185
|
f"{self._brynq.url}interfaces/{interface_id}/config/schedule",
|
|
186
186
|
timeout=self._brynq.timeout
|
|
187
187
|
)
|
|
@@ -207,7 +207,7 @@ class Interfaces:
|
|
|
207
207
|
Raises:
|
|
208
208
|
requests.exceptions.RequestException: If the API request fails
|
|
209
209
|
"""
|
|
210
|
-
response = self._brynq.
|
|
210
|
+
response = self._brynq.brynq_session.get(
|
|
211
211
|
url=f'{self._brynq.url}interfaces/{interface_id}/template-config',
|
|
212
212
|
timeout=self._brynq.timeout
|
|
213
213
|
)
|
|
@@ -233,7 +233,7 @@ class Interfaces:
|
|
|
233
233
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
234
234
|
raise ValueError("interface_id must be a positive integer")
|
|
235
235
|
|
|
236
|
-
response = self._brynq.
|
|
236
|
+
response = self._brynq.brynq_session.get(
|
|
237
237
|
f"{self._brynq.url}interfaces/{interface_id}/scope",
|
|
238
238
|
timeout=self._brynq.timeout
|
|
239
239
|
)
|
|
@@ -267,7 +267,7 @@ class Interfaces:
|
|
|
267
267
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
268
268
|
raise ValueError("interface_id must be a positive integer")
|
|
269
269
|
|
|
270
|
-
response = self._brynq.
|
|
270
|
+
response = self._brynq.brynq_session.get(
|
|
271
271
|
url=f"{self._brynq.url}interfaces/{interface_id}/config/dev-settings",
|
|
272
272
|
timeout=self._brynq.timeout
|
|
273
273
|
)
|
|
@@ -39,7 +39,7 @@ class Mappings:
|
|
|
39
39
|
if not isinstance(interface_id, int) or interface_id <= 0:
|
|
40
40
|
raise ValueError("interface_id must be a positive integer")
|
|
41
41
|
|
|
42
|
-
response = self._brynq.
|
|
42
|
+
response = self._brynq.brynq_session.get(
|
|
43
43
|
f"{self._brynq.url}interfaces/{interface_id}/config/mapping",
|
|
44
44
|
timeout=self._brynq.timeout
|
|
45
45
|
)
|
|
@@ -45,7 +45,7 @@ class OrganizationChart:
|
|
|
45
45
|
if layout not in ["nested", "flat"]:
|
|
46
46
|
raise ValueError('layout must be either "nested" or "flat"')
|
|
47
47
|
|
|
48
|
-
response = self._brynq.
|
|
48
|
+
response = self._brynq.brynq_session.get(
|
|
49
49
|
f"{self._brynq.url}organization-chart",
|
|
50
50
|
params={"layout": layout},
|
|
51
51
|
timeout=self._brynq.timeout
|
|
@@ -72,7 +72,7 @@ class OrganizationChart:
|
|
|
72
72
|
requests.exceptions.RequestException: If the API request fails
|
|
73
73
|
ValueError: If the response data is invalid
|
|
74
74
|
"""
|
|
75
|
-
response = self._brynq.
|
|
75
|
+
response = self._brynq.brynq_session.get(
|
|
76
76
|
f"{self._brynq.url}organization-chart/layers",
|
|
77
77
|
timeout=self._brynq.timeout
|
|
78
78
|
)
|
|
@@ -103,7 +103,7 @@ class OrganizationChart:
|
|
|
103
103
|
"""
|
|
104
104
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=OrganizationLayerCreate)
|
|
105
105
|
|
|
106
|
-
response = self._brynq.
|
|
106
|
+
response = self._brynq.brynq_session.post(
|
|
107
107
|
f"{self._brynq.url}organization-chart/layers",
|
|
108
108
|
json=valid_data[0],
|
|
109
109
|
timeout=self._brynq.timeout
|
|
@@ -130,7 +130,7 @@ class OrganizationChart:
|
|
|
130
130
|
"""
|
|
131
131
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=OrganizationLayerUpdate)
|
|
132
132
|
|
|
133
|
-
response = self._brynq.
|
|
133
|
+
response = self._brynq.brynq_session.put(
|
|
134
134
|
f"{self._brynq.url}organization-chart/layers/{data['id']}",
|
|
135
135
|
json=valid_data[0],
|
|
136
136
|
timeout=self._brynq.timeout
|
|
@@ -151,7 +151,7 @@ class OrganizationChart:
|
|
|
151
151
|
if not isinstance(layer_id, int):
|
|
152
152
|
raise ValueError("layer_id must be an integer")
|
|
153
153
|
|
|
154
|
-
response = self._brynq.
|
|
154
|
+
response = self._brynq.brynq_session.delete(
|
|
155
155
|
f"{self._brynq.url}organization-chart/layers/{layer_id}",
|
|
156
156
|
timeout=self._brynq.timeout
|
|
157
157
|
)
|
|
@@ -171,7 +171,7 @@ class OrganizationChart:
|
|
|
171
171
|
requests.exceptions.RequestException: If the API request fails
|
|
172
172
|
ValueError: If the response data is invalid
|
|
173
173
|
"""
|
|
174
|
-
response = self._brynq.
|
|
174
|
+
response = self._brynq.brynq_session.get(
|
|
175
175
|
url=f'{self._brynq.url}organization-chart/nodes',
|
|
176
176
|
timeout=self._brynq.timeout
|
|
177
177
|
)
|
|
@@ -199,7 +199,7 @@ class OrganizationChart:
|
|
|
199
199
|
|
|
200
200
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=OrganizationNodeCreate)
|
|
201
201
|
|
|
202
|
-
response = self._brynq.
|
|
202
|
+
response = self._brynq.brynq_session.post(
|
|
203
203
|
f"{self._brynq.url}organization-chart/nodes",
|
|
204
204
|
json=valid_data[0],
|
|
205
205
|
timeout=self._brynq.timeout
|
|
@@ -222,7 +222,7 @@ class OrganizationChart:
|
|
|
222
222
|
"""
|
|
223
223
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=OrganizationNodeUpdate)
|
|
224
224
|
|
|
225
|
-
response = self._brynq.
|
|
225
|
+
response = self._brynq.brynq_session.put(
|
|
226
226
|
f"{self._brynq.url}organization-chart/nodes/{data['id']}",
|
|
227
227
|
json=valid_data[0],
|
|
228
228
|
timeout=self._brynq.timeout
|
|
@@ -243,7 +243,7 @@ class OrganizationChart:
|
|
|
243
243
|
if not isinstance(node_id, int):
|
|
244
244
|
raise ValueError("node_id must be an integer")
|
|
245
245
|
|
|
246
|
-
response = self._brynq.
|
|
246
|
+
response = self._brynq.brynq_session.delete(
|
|
247
247
|
f"{self._brynq.url}organization-chart/nodes/{node_id}",
|
|
248
248
|
timeout=self._brynq.timeout
|
|
249
249
|
)
|
|
@@ -25,7 +25,7 @@ class Roles:
|
|
|
25
25
|
requests.HTTPError: If the API request fails
|
|
26
26
|
ValueError: If the role data is invalid
|
|
27
27
|
"""
|
|
28
|
-
response = self._brynq.
|
|
28
|
+
response = self._brynq.brynq_session.get(
|
|
29
29
|
url=f'{self._brynq.url}roles',
|
|
30
30
|
timeout=self._brynq.timeout
|
|
31
31
|
)
|
|
@@ -54,7 +54,7 @@ class Roles:
|
|
|
54
54
|
ValueError: If the response data is invalid.
|
|
55
55
|
requests.exceptions.RequestException: If the API request fails.
|
|
56
56
|
"""
|
|
57
|
-
response = self._brynq.
|
|
57
|
+
response = self._brynq.brynq_session.get(
|
|
58
58
|
f"{self._brynq.url}roles/{role_id}",
|
|
59
59
|
timeout=self._brynq.timeout
|
|
60
60
|
)
|
|
@@ -85,7 +85,7 @@ class Roles:
|
|
|
85
85
|
try:
|
|
86
86
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=CreateRoleRequest)
|
|
87
87
|
if valid_data:
|
|
88
|
-
response = self._brynq.
|
|
88
|
+
response = self._brynq.brynq_session.post(
|
|
89
89
|
f"{self._brynq.url}roles",
|
|
90
90
|
json=valid_data[0],
|
|
91
91
|
timeout=self._brynq.timeout
|
|
@@ -116,7 +116,7 @@ class Roles:
|
|
|
116
116
|
try:
|
|
117
117
|
valid_data, _ = Functions.validate_pydantic_data(data, schema=RoleSchema)
|
|
118
118
|
if valid_data:
|
|
119
|
-
response = self._brynq.
|
|
119
|
+
response = self._brynq.brynq_session.put(
|
|
120
120
|
f"{self._brynq.url}roles/{data['id']}",
|
|
121
121
|
json=valid_data[0],
|
|
122
122
|
timeout=self._brynq.timeout
|
|
@@ -144,7 +144,7 @@ class Roles:
|
|
|
144
144
|
raise ValueError("role_id must be a positive integer")
|
|
145
145
|
|
|
146
146
|
params = {"force": "true" if force else "false"}
|
|
147
|
-
response = self._brynq.
|
|
147
|
+
response = self._brynq.brynq_session.delete(
|
|
148
148
|
f"{self._brynq.url}roles/{role_id}",
|
|
149
149
|
params=params,
|
|
150
150
|
timeout=self._brynq.timeout
|
|
@@ -169,7 +169,7 @@ class Roles:
|
|
|
169
169
|
if not isinstance(role_id, int) or role_id <= 0:
|
|
170
170
|
raise ValueError("role_id must be a positive integer")
|
|
171
171
|
|
|
172
|
-
response = self._brynq.
|
|
172
|
+
response = self._brynq.brynq_session.get(
|
|
173
173
|
f"{self._brynq.url}roles/{role_id}/users",
|
|
174
174
|
timeout=self._brynq.timeout
|
|
175
175
|
)
|
|
@@ -202,7 +202,7 @@ class Roles:
|
|
|
202
202
|
|
|
203
203
|
try:
|
|
204
204
|
valid_data, _ = Functions.validate_pydantic_data(dashboard_rights, schema=DashboardRight)
|
|
205
|
-
response = self._brynq.
|
|
205
|
+
response = self._brynq.brynq_session.post(
|
|
206
206
|
f"{self._brynq.url}roles/{role_id}/dashboards",
|
|
207
207
|
json=valid_data[0],
|
|
208
208
|
timeout=self._brynq.timeout
|
|
@@ -233,7 +233,7 @@ class Roles:
|
|
|
233
233
|
|
|
234
234
|
try:
|
|
235
235
|
valid_data, _ = Functions.validate_pydantic_data(qlik_dashboard_rights, schema=QlikDashboardRight)
|
|
236
|
-
response = self._brynq.
|
|
236
|
+
response = self._brynq.brynq_session.post(
|
|
237
237
|
f"{self._brynq.url}roles/{role_id}/dashboards/qlik",
|
|
238
238
|
json=valid_data[0],
|
|
239
239
|
timeout=self._brynq.timeout
|
|
@@ -263,7 +263,7 @@ class Roles:
|
|
|
263
263
|
payload = {"qlikDashboards": qlik_dashboards}
|
|
264
264
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=QlikDashboardRight)
|
|
265
265
|
|
|
266
|
-
response = self._brynq.
|
|
266
|
+
response = self._brynq.brynq_session.post(
|
|
267
267
|
f"{self._brynq.url}roles/{role_id}/dashboards/qlik",
|
|
268
268
|
json=valid_data[0],
|
|
269
269
|
timeout=self._brynq.timeout
|
|
@@ -25,7 +25,7 @@ class SourceSystems:
|
|
|
25
25
|
Raises:
|
|
26
26
|
requests.exceptions.RequestException: If the API request fails
|
|
27
27
|
"""
|
|
28
|
-
response = self._brynq.
|
|
28
|
+
response = self._brynq.brynq_session.get(
|
|
29
29
|
url=f'{self._brynq.url}source-systems',
|
|
30
30
|
timeout=self._brynq.timeout
|
|
31
31
|
)
|
|
@@ -50,7 +50,7 @@ class SourceSystems:
|
|
|
50
50
|
'name': name,
|
|
51
51
|
'entities': entities or []
|
|
52
52
|
}
|
|
53
|
-
response = self._brynq.
|
|
53
|
+
response = self._brynq.brynq_session.post(
|
|
54
54
|
url=f'{self._brynq.url}source-systems',
|
|
55
55
|
json=data,
|
|
56
56
|
timeout=self._brynq.timeout
|
|
@@ -68,7 +68,7 @@ class SourceSystems:
|
|
|
68
68
|
Raises:
|
|
69
69
|
requests.exceptions.RequestException: If the API request fails
|
|
70
70
|
"""
|
|
71
|
-
response = self._brynq.
|
|
71
|
+
response = self._brynq.brynq_session.delete(
|
|
72
72
|
url=f'{self._brynq.url}source-systems/{system_id}',
|
|
73
73
|
timeout=self._brynq.timeout
|
|
74
74
|
)
|
|
@@ -94,7 +94,7 @@ class SourceSystems:
|
|
|
94
94
|
'name': name,
|
|
95
95
|
'entities': entities or []
|
|
96
96
|
}
|
|
97
|
-
response = self._brynq.
|
|
97
|
+
response = self._brynq.brynq_session.put(
|
|
98
98
|
url=f'{self._brynq.url}source-systems/{system_id}',
|
|
99
99
|
json=data,
|
|
100
100
|
timeout=self._brynq.timeout
|
|
@@ -115,7 +115,7 @@ class SourceSystems:
|
|
|
115
115
|
Raises:
|
|
116
116
|
requests.exceptions.RequestException: If the API request fails
|
|
117
117
|
"""
|
|
118
|
-
response = self._brynq.
|
|
118
|
+
response = self._brynq.brynq_session.get(
|
|
119
119
|
url=f'{self._brynq.url}source-systems/{system_id}/entities',
|
|
120
120
|
timeout=self._brynq.timeout
|
|
121
121
|
)
|
|
@@ -138,7 +138,7 @@ class SourceSystems:
|
|
|
138
138
|
requests.exceptions.HTTPError: If source system is not found (404)
|
|
139
139
|
"""
|
|
140
140
|
data = {'entities': entities}
|
|
141
|
-
response = self._brynq.
|
|
141
|
+
response = self._brynq.brynq_session.post(
|
|
142
142
|
url=f'{self._brynq.url}source-systems/{system_id}/entities',
|
|
143
143
|
json=data,
|
|
144
144
|
timeout=self._brynq.timeout
|
|
@@ -166,7 +166,7 @@ class SourceSystems:
|
|
|
166
166
|
'name': name,
|
|
167
167
|
'code': code
|
|
168
168
|
}
|
|
169
|
-
response = self._brynq.
|
|
169
|
+
response = self._brynq.brynq_session.put(
|
|
170
170
|
url=f'{self._brynq.url}source-systems/entities/{entity_id}',
|
|
171
171
|
json=data,
|
|
172
172
|
timeout=self._brynq.timeout
|
|
@@ -39,7 +39,7 @@ class Users:
|
|
|
39
39
|
requests.exceptions.RequestException: If the API request fails
|
|
40
40
|
ValueError: If the response data is invalid
|
|
41
41
|
"""
|
|
42
|
-
response = self._brynq.
|
|
42
|
+
response = self._brynq.brynq_session.get(
|
|
43
43
|
url=f'{self._brynq.url}users',
|
|
44
44
|
timeout=self._brynq.timeout
|
|
45
45
|
)
|
|
@@ -62,7 +62,7 @@ class Users:
|
|
|
62
62
|
requests.exceptions.RequestException: If the API request fails
|
|
63
63
|
requests.exceptions.HTTPError: If user is not found (404)
|
|
64
64
|
"""
|
|
65
|
-
response = self._brynq.
|
|
65
|
+
response = self._brynq.brynq_session.get(
|
|
66
66
|
url=f'{self._brynq.url}users/{user_id}',
|
|
67
67
|
timeout=self._brynq.timeout
|
|
68
68
|
)
|
|
@@ -90,7 +90,7 @@ class Users:
|
|
|
90
90
|
"""
|
|
91
91
|
valid_data, _ = Functions.validate_pydantic_data(user_data, schema=UserInvite)
|
|
92
92
|
|
|
93
|
-
response = self._brynq.
|
|
93
|
+
response = self._brynq.brynq_session.post(
|
|
94
94
|
url=f'{self._brynq.url}users',
|
|
95
95
|
json=valid_data[0],
|
|
96
96
|
timeout=self._brynq.timeout
|
|
@@ -129,7 +129,7 @@ class Users:
|
|
|
129
129
|
|
|
130
130
|
valid_data, _ = Functions.validate_pydantic_data(user_data, schema=UserUpdate)
|
|
131
131
|
|
|
132
|
-
response = self._brynq.
|
|
132
|
+
response = self._brynq.brynq_session.put(
|
|
133
133
|
url=f'{self._brynq.url}users/{user_id}',
|
|
134
134
|
json=valid_data[0],
|
|
135
135
|
timeout=self._brynq.timeout
|
|
@@ -145,7 +145,7 @@ class Users:
|
|
|
145
145
|
"""
|
|
146
146
|
if not isinstance(user_id, int):
|
|
147
147
|
raise ValueError("user_id must be an integer")
|
|
148
|
-
response = self._brynq.
|
|
148
|
+
response = self._brynq.brynq_session.delete(
|
|
149
149
|
url=f'{self._brynq.url}users/{user_id}',
|
|
150
150
|
timeout=self._brynq.timeout
|
|
151
151
|
)
|
|
@@ -179,7 +179,7 @@ class Users:
|
|
|
179
179
|
}
|
|
180
180
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=DashboardRightsPayload)
|
|
181
181
|
|
|
182
|
-
response = self._brynq.
|
|
182
|
+
response = self._brynq.brynq_session.post(
|
|
183
183
|
url=f'{self._brynq.url}users/{user_id}/dashboards',
|
|
184
184
|
json=valid_data[0],
|
|
185
185
|
timeout=self._brynq.timeout
|
|
@@ -206,7 +206,7 @@ class Users:
|
|
|
206
206
|
payload = {"roles": roles}
|
|
207
207
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=UserRolesPayload)
|
|
208
208
|
|
|
209
|
-
response = self._brynq.
|
|
209
|
+
response = self._brynq.brynq_session.post(
|
|
210
210
|
url=f'{self._brynq.url}users/{user_id}/roles',
|
|
211
211
|
json=valid_data[0],
|
|
212
212
|
timeout=self._brynq.timeout
|
|
@@ -232,7 +232,7 @@ class Users:
|
|
|
232
232
|
raise ValueError("user_id must be an integer")
|
|
233
233
|
payload = {"organigramEntities": organigram_entities}
|
|
234
234
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=UserEntitiesPayload)
|
|
235
|
-
response = self._brynq.
|
|
235
|
+
response = self._brynq.brynq_session.post(
|
|
236
236
|
url=f"{self._brynq.url}users/{user_id}/organigram-entities",
|
|
237
237
|
json=valid_data[0],
|
|
238
238
|
timeout=self._brynq.timeout
|
|
@@ -258,7 +258,7 @@ class Users:
|
|
|
258
258
|
raise ValueError("user_id must be an integer")
|
|
259
259
|
payload = {"qlikDashboardRights": qlik_dashboard_rights}
|
|
260
260
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=QlikDashboardRightsPayload)
|
|
261
|
-
response = self._brynq.
|
|
261
|
+
response = self._brynq.brynq_session.post(
|
|
262
262
|
url=f"{self._brynq.url}users/{user_id}/dashboards/qlik",
|
|
263
263
|
json=valid_data[0],
|
|
264
264
|
timeout=self._brynq.timeout
|
|
@@ -294,7 +294,7 @@ class Users:
|
|
|
294
294
|
}
|
|
295
295
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=QlikDashboardRightsPayload)
|
|
296
296
|
|
|
297
|
-
response = self._brynq.
|
|
297
|
+
response = self._brynq.brynq_session.post(
|
|
298
298
|
url=f'{self._brynq.url}users/{user_id}/dashboards/qlik',
|
|
299
299
|
json=valid_data[0],
|
|
300
300
|
timeout=self._brynq.timeout
|
|
@@ -322,7 +322,7 @@ class Users:
|
|
|
322
322
|
requests.exceptions.RequestException: If the API request fails
|
|
323
323
|
ValueError: If the input data is invalid
|
|
324
324
|
"""
|
|
325
|
-
response = self._brynq.
|
|
325
|
+
response = self._brynq.brynq_session.get(
|
|
326
326
|
url=f'{self._brynq.url}/qlik/{guid}/users',
|
|
327
327
|
timeout=self._brynq.timeout
|
|
328
328
|
)
|
|
@@ -351,7 +351,7 @@ class Users:
|
|
|
351
351
|
payload = {"entities": entity_ids}
|
|
352
352
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=UserEntitiesPayload)
|
|
353
353
|
|
|
354
|
-
response = self._brynq.
|
|
354
|
+
response = self._brynq.brynq_session.post(
|
|
355
355
|
url=f'{self._brynq.url}users/{user_id}/organigram-entities',
|
|
356
356
|
json=valid_data[0],
|
|
357
357
|
timeout=self._brynq.timeout
|
|
@@ -378,7 +378,7 @@ class Users:
|
|
|
378
378
|
payload = {"entities": entity_ids}
|
|
379
379
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=UserEntitiesPayload)
|
|
380
380
|
|
|
381
|
-
response = self._brynq.
|
|
381
|
+
response = self._brynq.brynq_session.put(
|
|
382
382
|
url=f'{self._brynq.url}users/{user_id}/organigram-entities',
|
|
383
383
|
json=valid_data[0],
|
|
384
384
|
timeout=self._brynq.timeout
|
|
@@ -405,7 +405,7 @@ class Users:
|
|
|
405
405
|
payload = {"entities": entity_ids}
|
|
406
406
|
valid_data, _ = Functions.validate_pydantic_data(payload, schema=UserEntitiesPayload)
|
|
407
407
|
|
|
408
|
-
response = self._brynq.
|
|
408
|
+
response = self._brynq.brynq_session.delete(
|
|
409
409
|
url=f'{self._brynq.url}users/{user_id}/organigram-entities',
|
|
410
410
|
json=valid_data[0],
|
|
411
411
|
timeout=self._brynq.timeout
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq/schemas/organization_chart.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{brynq_sdk_brynq-3.0.4 → brynq_sdk_brynq-3.0.5}/brynq_sdk_brynq.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|