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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420






arthurai.client.validation.validate\_response\_status - Arthur SDK Reference documentation





 body {
 --color-code-background: #f8f8f8;
 --color-code-foreground: black;
 --color-foreground-primary: #1a0016;
 --color-foreground-secondary: #473351;
 --color-background-primary: #ffffff;
 --color-background-secondary: #473351;
 --color-brand-primary: #b536fb;
 --color-api-background: #e4e0e4;
 --color-background-border: #e4e0e4;
 --color-inline-code-background: #e4e0e4;
 --color-icon: #473351;
 --color-toc-item-text: #1a0016;
 --color-toc-item-text--active: #473351;
 --color-highlight-on-target: #c7fdd1;
 --color-brand-content: #329ad7;
 --color-sidebar-background: #473351;
 --color-sidebar-link-text: #ffffff;
 --color-sidebar-link-text--top-level: #c7fdd1;
 --color-sidebar-item-background--hover: #ffffff;
 --color-sidebar-text--hover: #1a0016;
 --color-sidebar-search-text: #ffffff;
 --color-sidebar-search-border: #e4e0e4;
 --color-sidebar-search-foreground: #1a0016;
 --color-sidebar-search-foreground--inactive: #e4e0e4;
 --color-sidebar-search-background--focus: #ffffff;
 --font-stack: Graphik, sans-serif;
 --font-stack--monospace: IBM Plex Mono, monospace;
 --color-table-header-background: #e4e0e4;
 
 }
 @media not print {
 body[data-theme="dark"] {
 --color-code-background: #202020;
 --color-code-foreground: #d0d0d0;
 --color-foreground-primary: #ffffff;
 --color-foreground-secondary: #e4e0e4;
 --color-background-primary: #1a0016;
 --color-background-secondary: #473351;
 --color-brand-primary: #b536fb;
 --color-api-background: #473351;
 --color-background-border: #473351;
 --color-inline-code-background: #473351;
 --color-icon: #e4e0e4;
 --color-toc-item-text: #ffffff;
 --color-toc-item-text--active: #e4e0e4;
 --color-highlight-on-target: #473351;
 --color-brand-content: #329ad7;
 --color-sidebar-background: #473351;
 --color-sidebar-link-text: #ffffff;
 --color-sidebar-link-text--top-level: #c7fdd1;
 --color-sidebar-item-background--hover: #ffffff;
 --color-sidebar-text--hover: #1a0016;
 --color-sidebar-search-text: #ffffff;
 --color-sidebar-search-border: #e4e0e4;
 --color-sidebar-search-foreground: #1a0016;
 --color-sidebar-search-foreground--inactive: #e4e0e4;
 --color-sidebar-search-background--focus: #ffffff;
 --font-stack: Graphik, sans-serif;
 --font-stack--monospace: IBM Plex Mono, monospace;
 --color-table-header-background: #473351;
 
 }
 @media (prefers-color-scheme: dark) {
 body:not([data-theme="light"]) {
 --color-code-background: #202020;
 --color-code-foreground: #d0d0d0;
 --color-foreground-primary: #ffffff;
 --color-foreground-secondary: #e4e0e4;
 --color-background-primary: #1a0016;
 --color-background-secondary: #473351;
 --color-brand-primary: #b536fb;
 --color-api-background: #473351;
 --color-background-border: #473351;
 --color-inline-code-background: #473351;
 --color-icon: #e4e0e4;
 --color-toc-item-text: #ffffff;
 --color-toc-item-text--active: #e4e0e4;
 --color-highlight-on-target: #473351;
 --color-brand-content: #329ad7;
 --color-sidebar-background: #473351;
 --color-sidebar-link-text: #ffffff;
 --color-sidebar-link-text--top-level: #c7fdd1;
 --color-sidebar-item-background--hover: #ffffff;
 --color-sidebar-text--hover: #1a0016;
 --color-sidebar-search-text: #ffffff;
 --color-sidebar-search-border: #e4e0e4;
 --color-sidebar-search-foreground: #1a0016;
 --color-sidebar-search-foreground--inactive: #e4e0e4;
 --color-sidebar-search-background--focus: #ffffff;
 --font-stack: Graphik, sans-serif;
 --font-stack--monospace: IBM Plex Mono, monospace;
 --color-table-header-background: #473351;
 
 }
 }
 }



 document.body.dataset.theme = localStorage.getItem("theme") || "auto";
 


Contents





Menu







Expand





Light mode













Dark mode






Auto light/dark mode














Hide navigation sidebar


Hide table of contents sidebar





Toggle site navigation sidebar




[Arthur SDK Reference documentation](../index.html)




Toggle Light / Dark / Auto color theme






Toggle table of contents sidebar






[![Light Logo](../_static/images/dark-mode-logo.svg)
![Dark Logo](../_static/images/dark-mode-logo.svg)](../index.html)





* [Arthur Docs](https://docs.arthur.ai)
* [SDK Home](../index.html)
* [Permissions by Function](../permissions.html)
* [arthurai](arthurai.html)Toggle child pages in navigation
	+ [arthurai.client](arthurai.client.html)Toggle child pages in navigation
		- [arthurai.client.apiv3](arthurai.client.apiv3.html)
		- [arthurai.client.client](arthurai.client.client.html)Toggle child pages in navigation
			* [arthurai.client.client.new\_requests\_client](arthurai.client.client.new_requests_client.html)
			* [arthurai.client.client.ArthurAI](arthurai.client.client.ArthurAI.html)
		- [arthurai.client.helper](arthurai.client.helper.html)Toggle child pages in navigation
			* [arthurai.client.helper.construct\_url](arthurai.client.helper.construct_url.html)
			* [arthurai.client.helper.get\_arthur\_internal\_user\_org](arthurai.client.helper.get_arthur_internal_user_org.html)
			* [arthurai.client.helper.get\_auth\_info](arthurai.client.helper.get_auth_info.html)
			* [arthurai.client.helper.get\_current\_org](arthurai.client.helper.get_current_org.html)
			* [arthurai.client.helper.user\_login](arthurai.client.helper.user_login.html)
		- [arthurai.client.http](arthurai.client.http.html)Toggle child pages in navigation
			* [arthurai.client.http.arthur](arthurai.client.http.arthur.html)Toggle child pages in navigation
				+ [arthurai.client.http.arthur.ArthurHTTPClient](arthurai.client.http.arthur.ArthurHTTPClient.html)
			* [arthurai.client.http.base](arthurai.client.http.base.html)Toggle child pages in navigation
				+ [arthurai.client.http.base.AbstractHTTPClient](arthurai.client.http.base.AbstractHTTPClient.html)
			* [arthurai.client.http.requests](arthurai.client.http.requests.html)Toggle child pages in navigation
				+ [arthurai.client.http.requests.HTTPClient](arthurai.client.http.requests.HTTPClient.html)
		- [arthurai.client.validation](arthurai.client.validation.html)Toggle child pages in navigation
			* [arthurai.client.validation.validate\_multistatus\_response\_and\_get\_failures](arthurai.client.validation.validate_multistatus_response_and_get_failures.html)
			* [arthurai.client.validation.validate\_response\_status](#)
	+ [arthurai.common](arthurai.common.html)Toggle child pages in navigation
		- [arthurai.common.constants](arthurai.common.constants.html)Toggle child pages in navigation
			* [arthurai.common.constants.AccuracyMetric](arthurai.common.constants.AccuracyMetric.html)
			* [arthurai.common.constants.Enrichment](arthurai.common.constants.Enrichment.html)
			* [arthurai.common.constants.ImageContentType](arthurai.common.constants.ImageContentType.html)
			* [arthurai.common.constants.ImageResponseType](arthurai.common.constants.ImageResponseType.html)
			* [arthurai.common.constants.InputType](arthurai.common.constants.InputType.html)
			* [arthurai.common.constants.ListableStrEnum](arthurai.common.constants.ListableStrEnum.html)
			* [arthurai.common.constants.OutputType](arthurai.common.constants.OutputType.html)
			* [arthurai.common.constants.Role](arthurai.common.constants.Role.html)
			* [arthurai.common.constants.Stage](arthurai.common.constants.Stage.html)
			* [arthurai.common.constants.TextDelimiter](arthurai.common.constants.TextDelimiter.html)
			* [arthurai.common.constants.ValueType](arthurai.common.constants.ValueType.html)
		- [arthurai.common.exceptions](arthurai.common.exceptions.html)Toggle child pages in navigation
			* [arthurai.common.exceptions.arthur\_excepted](arthurai.common.exceptions.arthur_excepted.html)
		- [arthurai.common.log](arthurai.common.log.html)Toggle child pages in navigation
			* [arthurai.common.log.disable\_debug\_logging](arthurai.common.log.disable_debug_logging.html)
			* [arthurai.common.log.enable\_debug\_logging](arthurai.common.log.enable_debug_logging.html)
			* [arthurai.common.log.initialize\_logging](arthurai.common.log.initialize_logging.html)
			* [arthurai.common.log.InfoFilter](arthurai.common.log.InfoFilter.html)
	+ [arthurai.core](arthurai.core.html)Toggle child pages in navigation
		- [arthurai.core.alerts](arthurai.core.alerts.html)Toggle child pages in navigation
			* [arthurai.core.alerts.Alert](arthurai.core.alerts.Alert.html)
			* [arthurai.core.alerts.AlertRule](arthurai.core.alerts.AlertRule.html)
			* [arthurai.core.alerts.AlertRuleBound](arthurai.core.alerts.AlertRuleBound.html)
			* [arthurai.core.alerts.AlertRuleSeverity](arthurai.core.alerts.AlertRuleSeverity.html)
			* [arthurai.core.alerts.AlertStatus](arthurai.core.alerts.AlertStatus.html)
			* [arthurai.core.alerts.Metric](arthurai.core.alerts.Metric.html)
			* [arthurai.core.alerts.MetricType](arthurai.core.alerts.MetricType.html)
		- [arthurai.core.attributes](arthurai.core.attributes.html)Toggle child pages in navigation
			* [arthurai.core.attributes.ArthurAttribute](arthurai.core.attributes.ArthurAttribute.html)
			* [arthurai.core.attributes.AttributeBin](arthurai.core.attributes.AttributeBin.html)
			* [arthurai.core.attributes.AttributeCategory](arthurai.core.attributes.AttributeCategory.html)
		- [arthurai.core.auth\_info](arthurai.core.auth_info.html)Toggle child pages in navigation
			* [arthurai.core.auth\_info.AuthInfo](arthurai.core.auth_info.AuthInfo.html)
		- [arthurai.core.base](arthurai.core.base.html)Toggle child pages in navigation
			* [arthurai.core.base.ArthurBaseJsonDataclass](arthurai.core.base.ArthurBaseJsonDataclass.html)
		- [arthurai.core.bias](arthurai.core.bias.html)Toggle child pages in navigation
			* [arthurai.core.bias.bias\_metrics](arthurai.core.bias.bias_metrics.html)Toggle child pages in navigation
				+ [arthurai.core.bias.bias\_metrics.BiasMetrics](arthurai.core.bias.bias_metrics.BiasMetrics.html)
			* [arthurai.core.bias.bias\_wrapper](arthurai.core.bias.bias_wrapper.html)Toggle child pages in navigation
				+ [arthurai.core.bias.bias\_wrapper.ArthurBiasWrapper](arthurai.core.bias.bias_wrapper.ArthurBiasWrapper.html)
			* [arthurai.core.bias.threshold\_mitigation](arthurai.core.bias.threshold_mitigation.html)Toggle child pages in navigation
				+ [arthurai.core.bias.threshold\_mitigation.Curves](arthurai.core.bias.threshold_mitigation.Curves.html)
				+ [arthurai.core.bias.threshold\_mitigation.ThresholdMitigation](arthurai.core.bias.threshold_mitigation.ThresholdMitigation.html)
		- [arthurai.core.data\_service](arthurai.core.data_service.html)Toggle child pages in navigation
			* [arthurai.core.data\_service.DatasetService](arthurai.core.data_service.DatasetService.html)
			* [arthurai.core.data\_service.ImageZipper](arthurai.core.data_service.ImageZipper.html)
		- [arthurai.core.decorators](arthurai.core.decorators.html)Toggle child pages in navigation
			* [arthurai.core.decorators.log\_prediction](arthurai.core.decorators.log_prediction.html)
		- [arthurai.core.inferences](arthurai.core.inferences.html)Toggle child pages in navigation
			* [arthurai.core.inferences.add\_inference\_metadata\_to\_dataframe](arthurai.core.inferences.add_inference_metadata_to_dataframe.html)
			* [arthurai.core.inferences.add\_predictions\_or\_ground\_truth](arthurai.core.inferences.add_predictions_or_ground_truth.html)
			* [arthurai.core.inferences.nest\_inference\_and\_ground\_truth\_data](arthurai.core.inferences.nest_inference_and_ground_truth_data.html)
			* [arthurai.core.inferences.parse\_stage\_attributes](arthurai.core.inferences.parse_stage_attributes.html)
		- [arthurai.core.model\_utils](arthurai.core.model_utils.html)Toggle child pages in navigation
			* [arthurai.core.model\_utils.check\_attr\_is\_bias](arthurai.core.model_utils.check_attr_is_bias.html)
			* [arthurai.core.model\_utils.check\_has\_bias\_attrs](arthurai.core.model_utils.check_has_bias_attrs.html)
			* [arthurai.core.model\_utils.get\_positive\_predicted\_class](arthurai.core.model_utils.get_positive_predicted_class.html)
		- [arthurai.core.models](arthurai.core.models.html)Toggle child pages in navigation
			* [arthurai.core.models.ArthurModel](arthurai.core.models.ArthurModel.html)
			* [arthurai.core.models.ArthurModelGroup](arthurai.core.models.ArthurModelGroup.html)
			* [arthurai.core.models.ExplainabilityParameters](arthurai.core.models.ExplainabilityParameters.html)
		- [arthurai.core.util](arthurai.core.util.html)Toggle child pages in navigation
			* [arthurai.core.util.dataframe\_like\_to\_list\_of\_dicts](arthurai.core.util.dataframe_like_to_list_of_dicts.html)
			* [arthurai.core.util.intersection\_is\_non\_empty](arthurai.core.util.intersection_is_non_empty.html)
			* [arthurai.core.util.retrieve\_parquet\_files](arthurai.core.util.retrieve_parquet_files.html)
			* [arthurai.core.util.standardize\_pd\_obj](arthurai.core.util.standardize_pd_obj.html)
			* [arthurai.core.util.update\_column\_in\_list\_of\_dicts](arthurai.core.util.update_column_in_list_of_dicts.html)
			* [arthurai.core.util.NumpyEncoder](arthurai.core.util.NumpyEncoder.html)
		- [arthurai.core.viz](arthurai.core.viz.html)Toggle child pages in navigation
			* [arthurai.core.viz.style](arthurai.core.viz.style.html)
			* [arthurai.core.viz.utils](arthurai.core.viz.utils.html)Toggle child pages in navigation
				+ [arthurai.core.viz.utils.get\_pred\_and\_gt\_attrs](arthurai.core.viz.utils.get_pred_and_gt_attrs.html)
				+ [arthurai.core.viz.utils.savgol\_filter](arthurai.core.viz.utils.savgol_filter.html)
			* [arthurai.core.viz.visualizer](arthurai.core.viz.visualizer.html)Toggle child pages in navigation
				+ [arthurai.core.viz.visualizer.DataVisualizer](arthurai.core.viz.visualizer.DataVisualizer.html)
	+ [arthurai.explainability](arthurai.explainability.html)Toggle child pages in navigation
		- [arthurai.explainability.arthur\_explainer](arthurai.explainability.arthur_explainer.html)Toggle child pages in navigation
			* [arthurai.explainability.arthur\_explainer.ArthurExplainer](arthurai.explainability.arthur_explainer.ArthurExplainer.html)
			* [arthurai.explainability.arthur\_explainer.EmptyLimeExplanation](arthurai.explainability.arthur_explainer.EmptyLimeExplanation.html)
		- [arthurai.explainability.explanation\_packager](arthurai.explainability.explanation_packager.html)Toggle child pages in navigation
			* [arthurai.explainability.explanation\_packager.ExplanationPackager](arthurai.explainability.explanation_packager.ExplanationPackager.html)
		- [arthurai.explainability.validation](arthurai.explainability.validation.html)Toggle child pages in navigation
			* [arthurai.explainability.validation.validate\_predicted\_attribute\_order\_matches\_dataframe](arthurai.explainability.validation.validate_predicted_attribute_order_matches_dataframe.html)
			* [arthurai.explainability.validation.validate\_predicted\_attribute\_order\_matches\_remote](arthurai.explainability.validation.validate_predicted_attribute_order_matches_remote.html)
	+ [arthurai.util](arthurai.util.html)Toggle child pages in navigation
		- [arthurai.util.format\_timestamp](arthurai.util.format_timestamp.html)
		- [arthurai.util.format\_timestamps](arthurai.util.format_timestamps.html)
		- [arthurai.util.generate\_timestamps](arthurai.util.generate_timestamps.html)
		- [arthurai.util.is\_valid\_datetime\_string](arthurai.util.is_valid_datetime_string.html)
		- [arthurai.util.normal\_random\_ints\_fixed\_sum](arthurai.util.normal_random_ints_fixed_sum.html)
		- [arthurai.util.value\_type\_to\_python\_type](arthurai.util.value_type_to_python_type.html)
	+ [arthurai.version](arthurai.version.html)










[Back to top](#)



Toggle Light / Dark / Auto color theme






Toggle table of contents sidebar





arthurai.client.validation.validate\_response\_status[#](#arthurai-client-validation-validate-response-status "Permalink to this headline")
===========================================================================================================================================




arthurai.client.validation.validate\_response\_status(*response\_or\_code*, *expected\_status\_code=None*, *allow\_redirects=False*)[#](#arthurai.client.validation.validate_response_status "Permalink to this definition")
Validate the status code of a requests.Response object or (int) status code.
:type response\_or\_code: `Union`[`Response`, `int`]
:param response\_or\_code: the requests.Response object or status code to validate
:type expected\_status\_code: `Optional`[`int`]
:param expected\_status\_code: the expected status code to check for. If None, all codes <300 will be valid, and 3XX
codes will be subject to allow\_redirects
:type allow\_redirects: `Optional`[`bool`]
:param allow\_redirects: if True will not raise an exception for 3XX status codes
:rtype: `None`
:return: None
:raises InternalValueError: if expected\_status\_code is not None and does not match the response code
:raises ResponseServerError: if the response has a 5XX status code
:raises ResponseClientError: if the response has a 4XX status code
:raises ResponseRedirectError: if the response has a 3XX status code








[Next

arthurai.common](arthurai.common.html)
[Previous

arthurai.client.validation.validate\_multistatus\_response\_and\_get\_failures](arthurai.client.validation.validate_multistatus_response_and_get_failures.html)




 Copyright © 2022, Arthur
 
 Made with [Sphinx](https://www.sphinx-doc.org/) and [@pradyunsg](https://pradyunsg.me)'s
 
 [Furo](https://github.com/pradyunsg/furo)