fds.sdk.FactSetProgrammaticEnvironment 0.21.6__py3-none-any.whl

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.
@@ -0,0 +1,576 @@
1
+ """
2
+ FPE API
3
+
4
+ FactSet Programmatic Environment (FPE) API is an API for users to interact with FPE programmatically, streamlining path from research to production. # noqa: E501
5
+
6
+ The version of the OpenAPI document: 1.0.0
7
+ Generated by: https://openapi-generator.tech
8
+ """
9
+
10
+
11
+ import re # noqa: F401
12
+ import sys # noqa: F401
13
+ from multiprocessing.pool import ApplyResult
14
+ import typing
15
+
16
+ from fds.sdk.FactSetProgrammaticEnvironment.api_client import ApiClient, Endpoint as _Endpoint
17
+ from fds.sdk.FactSetProgrammaticEnvironment.model_utils import ( # noqa: F401
18
+ check_allowed_values,
19
+ check_validations,
20
+ date,
21
+ datetime,
22
+ file_type,
23
+ none_type,
24
+ validate_and_convert_types
25
+ )
26
+ from fds.sdk.FactSetProgrammaticEnvironment.exceptions import ApiException
27
+ from fds.sdk.FactSetProgrammaticEnvironment.model.file_upload_status import FileUploadStatus
28
+
29
+
30
+
31
+
32
+
33
+ class FilesApi(object):
34
+ """NOTE: This class is auto generated by OpenAPI Generator
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+ """
39
+
40
+ def __init__(self, api_client=None):
41
+ if api_client is None:
42
+ api_client = ApiClient()
43
+ self.api_client = api_client
44
+
45
+ self.analytics_quant_fpe_v1_files_server_file_post_endpoint = _Endpoint(
46
+ settings={
47
+ 'response_type': (
48
+ { 202: (FileUploadStatus,), },
49
+ None
50
+ ),
51
+ 'auth': [
52
+ 'FactSetApiKey',
53
+ 'FactSetOAuth2'
54
+ ],
55
+ 'endpoint_path': '/analytics/quant/fpe/v1/files/{server}/{file}',
56
+ 'operation_id': 'analytics_quant_fpe_v1_files_server_file_post',
57
+ 'http_method': 'POST',
58
+ 'servers': None,
59
+ },
60
+ params_map={
61
+ 'all': [
62
+ 'server',
63
+ 'file',
64
+ 'body',
65
+ ],
66
+ 'required': [
67
+ 'server',
68
+ 'file',
69
+ ],
70
+ 'nullable': [
71
+ ],
72
+ 'enum': [
73
+ ],
74
+ 'validation': [
75
+ ]
76
+ },
77
+ root_map={
78
+ 'validations': {
79
+ },
80
+ 'allowed_values': {
81
+ },
82
+ 'openapi_types': {
83
+ 'server':
84
+ (str,),
85
+ 'file':
86
+ (str,),
87
+ 'body':
88
+ (file_type,),
89
+ },
90
+ 'attribute_map': {
91
+ 'server': 'server',
92
+ 'file': 'file',
93
+ },
94
+ 'location_map': {
95
+ 'server': 'path',
96
+ 'file': 'path',
97
+ 'body': 'body',
98
+ },
99
+ 'collection_format_map': {
100
+ }
101
+ },
102
+ headers_map={
103
+ 'accept': [
104
+ 'application/json'
105
+ ],
106
+ 'content_type': [
107
+ '*'
108
+ ]
109
+ },
110
+ api_client=api_client
111
+ )
112
+
113
+ self.analytics_quant_fpe_v1_files_uploads_id_get_endpoint = _Endpoint(
114
+ settings={
115
+ 'response_type': (
116
+ { 200: (FileUploadStatus,), 202: (FileUploadStatus,), },
117
+ None
118
+ ),
119
+ 'auth': [
120
+ 'FactSetApiKey',
121
+ 'FactSetOAuth2'
122
+ ],
123
+ 'endpoint_path': '/analytics/quant/fpe/v1/files/uploads/{id}',
124
+ 'operation_id': 'analytics_quant_fpe_v1_files_uploads_id_get',
125
+ 'http_method': 'GET',
126
+ 'servers': None,
127
+ },
128
+ params_map={
129
+ 'all': [
130
+ 'id',
131
+ ],
132
+ 'required': [
133
+ 'id',
134
+ ],
135
+ 'nullable': [
136
+ ],
137
+ 'enum': [
138
+ ],
139
+ 'validation': [
140
+ ]
141
+ },
142
+ root_map={
143
+ 'validations': {
144
+ },
145
+ 'allowed_values': {
146
+ },
147
+ 'openapi_types': {
148
+ 'id':
149
+ (str,),
150
+ },
151
+ 'attribute_map': {
152
+ 'id': 'id',
153
+ },
154
+ 'location_map': {
155
+ 'id': 'path',
156
+ },
157
+ 'collection_format_map': {
158
+ }
159
+ },
160
+ headers_map={
161
+ 'accept': [
162
+ 'application/json'
163
+ ],
164
+ 'content_type': [],
165
+ },
166
+ api_client=api_client
167
+ )
168
+
169
+
170
+ @staticmethod
171
+ def apply_kwargs_defaults(kwargs, return_http_data_only, async_req):
172
+ kwargs["async_req"] = async_req
173
+ kwargs["_return_http_data_only"] = return_http_data_only
174
+ kwargs["_preload_content"] = kwargs.get("_preload_content", True)
175
+ kwargs["_request_timeout"] = kwargs.get("_request_timeout", None)
176
+ kwargs["_check_input_type"] = kwargs.get("_check_input_type", True)
177
+ kwargs["_check_return_type"] = kwargs.get("_check_return_type", True)
178
+ kwargs["_spec_property_naming"] = kwargs.get("_spec_property_naming", False)
179
+ kwargs["_content_type"] = kwargs.get("_content_type")
180
+ kwargs["_host_index"] = kwargs.get("_host_index")
181
+
182
+
183
+ def analytics_quant_fpe_v1_files_server_file_post(
184
+ self,
185
+ server,
186
+ file,
187
+ **kwargs
188
+ ) -> FileUploadStatus:
189
+ """Starts a file upload # noqa: E501
190
+
191
+ This endpoint takes a file and uploads it # noqa: E501
192
+ This method makes a synchronous HTTP request. Returns the http data only
193
+
194
+ Args:
195
+ server (str): The server to upload the file to. Either `interactive` or `batch`.
196
+ file (str): The file name to upload the file to. Existing directory can be specified.
197
+
198
+ Keyword Args:
199
+ body (file_type): [optional]
200
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
201
+ will be returned without reading/decoding response data.
202
+ Default is True.
203
+ _request_timeout (int/float/tuple): timeout setting for this request. If
204
+ one number provided, it will be total request timeout. It can also
205
+ be a pair (tuple) of (connection, read) timeouts.
206
+ Default is None.
207
+ _check_input_type (bool): specifies if type checking
208
+ should be done one the data sent to the server.
209
+ Default is True.
210
+ _check_return_type (bool): specifies if type checking
211
+ should be done one the data received from the server.
212
+ Default is True.
213
+ _spec_property_naming (bool): True if the variable names in the input data
214
+ are serialized names, as specified in the OpenAPI document.
215
+ False if the variable names in the input data
216
+ are pythonic names, e.g. snake case (default)
217
+ _content_type (str/None): force body content-type.
218
+ Default is None and content-type will be predicted by allowed
219
+ content-types and body.
220
+ _host_index (int/None): specifies the index of the server
221
+ that we want to use.
222
+ Default is read from the configuration.
223
+ Returns:
224
+ FileUploadStatus
225
+ Response Object
226
+ """
227
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=False)
228
+ kwargs['server'] = \
229
+ server
230
+ kwargs['file'] = \
231
+ file
232
+ return self.analytics_quant_fpe_v1_files_server_file_post_endpoint.call_with_http_info(**kwargs)
233
+
234
+ def analytics_quant_fpe_v1_files_server_file_post_with_http_info(
235
+ self,
236
+ server,
237
+ file,
238
+ **kwargs
239
+ ) -> typing.Tuple[FileUploadStatus, int, typing.MutableMapping]:
240
+ """Starts a file upload # noqa: E501
241
+
242
+ This endpoint takes a file and uploads it # noqa: E501
243
+ This method makes a synchronous HTTP request. Returns http data, http status and headers
244
+
245
+ Args:
246
+ server (str): The server to upload the file to. Either `interactive` or `batch`.
247
+ file (str): The file name to upload the file to. Existing directory can be specified.
248
+
249
+ Keyword Args:
250
+ body (file_type): [optional]
251
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
252
+ will be returned without reading/decoding response data.
253
+ Default is True.
254
+ _request_timeout (int/float/tuple): timeout setting for this request. If
255
+ one number provided, it will be total request timeout. It can also
256
+ be a pair (tuple) of (connection, read) timeouts.
257
+ Default is None.
258
+ _check_input_type (bool): specifies if type checking
259
+ should be done one the data sent to the server.
260
+ Default is True.
261
+ _check_return_type (bool): specifies if type checking
262
+ should be done one the data received from the server.
263
+ Default is True.
264
+ _spec_property_naming (bool): True if the variable names in the input data
265
+ are serialized names, as specified in the OpenAPI document.
266
+ False if the variable names in the input data
267
+ are pythonic names, e.g. snake case (default)
268
+ _content_type (str/None): force body content-type.
269
+ Default is None and content-type will be predicted by allowed
270
+ content-types and body.
271
+ _host_index (int/None): specifies the index of the server
272
+ that we want to use.
273
+ Default is read from the configuration.
274
+ Returns:
275
+ FileUploadStatus
276
+ Response Object
277
+ int
278
+ Http Status Code
279
+ dict
280
+ Dictionary of the response headers
281
+ """
282
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=False)
283
+ kwargs['server'] = \
284
+ server
285
+ kwargs['file'] = \
286
+ file
287
+ return self.analytics_quant_fpe_v1_files_server_file_post_endpoint.call_with_http_info(**kwargs)
288
+
289
+ def analytics_quant_fpe_v1_files_server_file_post_async(
290
+ self,
291
+ server,
292
+ file,
293
+ **kwargs
294
+ ) -> "ApplyResult[FileUploadStatus]":
295
+ """Starts a file upload # noqa: E501
296
+
297
+ This endpoint takes a file and uploads it # noqa: E501
298
+ This method makes a asynchronous HTTP request. Returns the http data, wrapped in ApplyResult
299
+
300
+ Args:
301
+ server (str): The server to upload the file to. Either `interactive` or `batch`.
302
+ file (str): The file name to upload the file to. Existing directory can be specified.
303
+
304
+ Keyword Args:
305
+ body (file_type): [optional]
306
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
307
+ will be returned without reading/decoding response data.
308
+ Default is True.
309
+ _request_timeout (int/float/tuple): timeout setting for this request. If
310
+ one number provided, it will be total request timeout. It can also
311
+ be a pair (tuple) of (connection, read) timeouts.
312
+ Default is None.
313
+ _check_input_type (bool): specifies if type checking
314
+ should be done one the data sent to the server.
315
+ Default is True.
316
+ _check_return_type (bool): specifies if type checking
317
+ should be done one the data received from the server.
318
+ Default is True.
319
+ _spec_property_naming (bool): True if the variable names in the input data
320
+ are serialized names, as specified in the OpenAPI document.
321
+ False if the variable names in the input data
322
+ are pythonic names, e.g. snake case (default)
323
+ _content_type (str/None): force body content-type.
324
+ Default is None and content-type will be predicted by allowed
325
+ content-types and body.
326
+ _host_index (int/None): specifies the index of the server
327
+ that we want to use.
328
+ Default is read from the configuration.
329
+ Returns:
330
+ ApplyResult[FileUploadStatus]
331
+ """
332
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=True)
333
+ kwargs['server'] = \
334
+ server
335
+ kwargs['file'] = \
336
+ file
337
+ return self.analytics_quant_fpe_v1_files_server_file_post_endpoint.call_with_http_info(**kwargs)
338
+
339
+ def analytics_quant_fpe_v1_files_server_file_post_with_http_info_async(
340
+ self,
341
+ server,
342
+ file,
343
+ **kwargs
344
+ ) -> "ApplyResult[typing.Tuple[FileUploadStatus, int, typing.MutableMapping]]":
345
+ """Starts a file upload # noqa: E501
346
+
347
+ This endpoint takes a file and uploads it # noqa: E501
348
+ This method makes a asynchronous HTTP request. Returns http data, http status and headers, wrapped in ApplyResult
349
+
350
+ Args:
351
+ server (str): The server to upload the file to. Either `interactive` or `batch`.
352
+ file (str): The file name to upload the file to. Existing directory can be specified.
353
+
354
+ Keyword Args:
355
+ body (file_type): [optional]
356
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
357
+ will be returned without reading/decoding response data.
358
+ Default is True.
359
+ _request_timeout (int/float/tuple): timeout setting for this request. If
360
+ one number provided, it will be total request timeout. It can also
361
+ be a pair (tuple) of (connection, read) timeouts.
362
+ Default is None.
363
+ _check_input_type (bool): specifies if type checking
364
+ should be done one the data sent to the server.
365
+ Default is True.
366
+ _check_return_type (bool): specifies if type checking
367
+ should be done one the data received from the server.
368
+ Default is True.
369
+ _spec_property_naming (bool): True if the variable names in the input data
370
+ are serialized names, as specified in the OpenAPI document.
371
+ False if the variable names in the input data
372
+ are pythonic names, e.g. snake case (default)
373
+ _content_type (str/None): force body content-type.
374
+ Default is None and content-type will be predicted by allowed
375
+ content-types and body.
376
+ _host_index (int/None): specifies the index of the server
377
+ that we want to use.
378
+ Default is read from the configuration.
379
+ Returns:
380
+ ApplyResult[(FileUploadStatus, int, typing.Dict)]
381
+ """
382
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=True)
383
+ kwargs['server'] = \
384
+ server
385
+ kwargs['file'] = \
386
+ file
387
+ return self.analytics_quant_fpe_v1_files_server_file_post_endpoint.call_with_http_info(**kwargs)
388
+
389
+
390
+ def analytics_quant_fpe_v1_files_uploads_id_get(
391
+ self,
392
+ id,
393
+ **kwargs
394
+ ) -> FileUploadStatus:
395
+ """Get upload status by id # noqa: E501
396
+
397
+ This is the endpoint to check on the progress of a previous upload request. # noqa: E501
398
+ This method makes a synchronous HTTP request. Returns the http data only
399
+
400
+ Args:
401
+ id (str): From url, provided by location header or response body in the upload start endpoint
402
+
403
+ Keyword Args:
404
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
405
+ will be returned without reading/decoding response data.
406
+ Default is True.
407
+ _request_timeout (int/float/tuple): timeout setting for this request. If
408
+ one number provided, it will be total request timeout. It can also
409
+ be a pair (tuple) of (connection, read) timeouts.
410
+ Default is None.
411
+ _check_input_type (bool): specifies if type checking
412
+ should be done one the data sent to the server.
413
+ Default is True.
414
+ _check_return_type (bool): specifies if type checking
415
+ should be done one the data received from the server.
416
+ Default is True.
417
+ _spec_property_naming (bool): True if the variable names in the input data
418
+ are serialized names, as specified in the OpenAPI document.
419
+ False if the variable names in the input data
420
+ are pythonic names, e.g. snake case (default)
421
+ _content_type (str/None): force body content-type.
422
+ Default is None and content-type will be predicted by allowed
423
+ content-types and body.
424
+ _host_index (int/None): specifies the index of the server
425
+ that we want to use.
426
+ Default is read from the configuration.
427
+ Returns:
428
+ FileUploadStatus
429
+ Response Object
430
+ """
431
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=False)
432
+ kwargs['id'] = \
433
+ id
434
+ return self.analytics_quant_fpe_v1_files_uploads_id_get_endpoint.call_with_http_info(**kwargs)
435
+
436
+ def analytics_quant_fpe_v1_files_uploads_id_get_with_http_info(
437
+ self,
438
+ id,
439
+ **kwargs
440
+ ) -> typing.Tuple[FileUploadStatus, int, typing.MutableMapping]:
441
+ """Get upload status by id # noqa: E501
442
+
443
+ This is the endpoint to check on the progress of a previous upload request. # noqa: E501
444
+ This method makes a synchronous HTTP request. Returns http data, http status and headers
445
+
446
+ Args:
447
+ id (str): From url, provided by location header or response body in the upload start endpoint
448
+
449
+ Keyword Args:
450
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
451
+ will be returned without reading/decoding response data.
452
+ Default is True.
453
+ _request_timeout (int/float/tuple): timeout setting for this request. If
454
+ one number provided, it will be total request timeout. It can also
455
+ be a pair (tuple) of (connection, read) timeouts.
456
+ Default is None.
457
+ _check_input_type (bool): specifies if type checking
458
+ should be done one the data sent to the server.
459
+ Default is True.
460
+ _check_return_type (bool): specifies if type checking
461
+ should be done one the data received from the server.
462
+ Default is True.
463
+ _spec_property_naming (bool): True if the variable names in the input data
464
+ are serialized names, as specified in the OpenAPI document.
465
+ False if the variable names in the input data
466
+ are pythonic names, e.g. snake case (default)
467
+ _content_type (str/None): force body content-type.
468
+ Default is None and content-type will be predicted by allowed
469
+ content-types and body.
470
+ _host_index (int/None): specifies the index of the server
471
+ that we want to use.
472
+ Default is read from the configuration.
473
+ Returns:
474
+ FileUploadStatus
475
+ Response Object
476
+ int
477
+ Http Status Code
478
+ dict
479
+ Dictionary of the response headers
480
+ """
481
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=False)
482
+ kwargs['id'] = \
483
+ id
484
+ return self.analytics_quant_fpe_v1_files_uploads_id_get_endpoint.call_with_http_info(**kwargs)
485
+
486
+ def analytics_quant_fpe_v1_files_uploads_id_get_async(
487
+ self,
488
+ id,
489
+ **kwargs
490
+ ) -> "ApplyResult[FileUploadStatus]":
491
+ """Get upload status by id # noqa: E501
492
+
493
+ This is the endpoint to check on the progress of a previous upload request. # noqa: E501
494
+ This method makes a asynchronous HTTP request. Returns the http data, wrapped in ApplyResult
495
+
496
+ Args:
497
+ id (str): From url, provided by location header or response body in the upload start endpoint
498
+
499
+ Keyword Args:
500
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
501
+ will be returned without reading/decoding response data.
502
+ Default is True.
503
+ _request_timeout (int/float/tuple): timeout setting for this request. If
504
+ one number provided, it will be total request timeout. It can also
505
+ be a pair (tuple) of (connection, read) timeouts.
506
+ Default is None.
507
+ _check_input_type (bool): specifies if type checking
508
+ should be done one the data sent to the server.
509
+ Default is True.
510
+ _check_return_type (bool): specifies if type checking
511
+ should be done one the data received from the server.
512
+ Default is True.
513
+ _spec_property_naming (bool): True if the variable names in the input data
514
+ are serialized names, as specified in the OpenAPI document.
515
+ False if the variable names in the input data
516
+ are pythonic names, e.g. snake case (default)
517
+ _content_type (str/None): force body content-type.
518
+ Default is None and content-type will be predicted by allowed
519
+ content-types and body.
520
+ _host_index (int/None): specifies the index of the server
521
+ that we want to use.
522
+ Default is read from the configuration.
523
+ Returns:
524
+ ApplyResult[FileUploadStatus]
525
+ """
526
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=True, async_req=True)
527
+ kwargs['id'] = \
528
+ id
529
+ return self.analytics_quant_fpe_v1_files_uploads_id_get_endpoint.call_with_http_info(**kwargs)
530
+
531
+ def analytics_quant_fpe_v1_files_uploads_id_get_with_http_info_async(
532
+ self,
533
+ id,
534
+ **kwargs
535
+ ) -> "ApplyResult[typing.Tuple[FileUploadStatus, int, typing.MutableMapping]]":
536
+ """Get upload status by id # noqa: E501
537
+
538
+ This is the endpoint to check on the progress of a previous upload request. # noqa: E501
539
+ This method makes a asynchronous HTTP request. Returns http data, http status and headers, wrapped in ApplyResult
540
+
541
+ Args:
542
+ id (str): From url, provided by location header or response body in the upload start endpoint
543
+
544
+ Keyword Args:
545
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
546
+ will be returned without reading/decoding response data.
547
+ Default is True.
548
+ _request_timeout (int/float/tuple): timeout setting for this request. If
549
+ one number provided, it will be total request timeout. It can also
550
+ be a pair (tuple) of (connection, read) timeouts.
551
+ Default is None.
552
+ _check_input_type (bool): specifies if type checking
553
+ should be done one the data sent to the server.
554
+ Default is True.
555
+ _check_return_type (bool): specifies if type checking
556
+ should be done one the data received from the server.
557
+ Default is True.
558
+ _spec_property_naming (bool): True if the variable names in the input data
559
+ are serialized names, as specified in the OpenAPI document.
560
+ False if the variable names in the input data
561
+ are pythonic names, e.g. snake case (default)
562
+ _content_type (str/None): force body content-type.
563
+ Default is None and content-type will be predicted by allowed
564
+ content-types and body.
565
+ _host_index (int/None): specifies the index of the server
566
+ that we want to use.
567
+ Default is read from the configuration.
568
+ Returns:
569
+ ApplyResult[(FileUploadStatus, int, typing.Dict)]
570
+ """
571
+ self.apply_kwargs_defaults(kwargs=kwargs, return_http_data_only=False, async_req=True)
572
+ kwargs['id'] = \
573
+ id
574
+ return self.analytics_quant_fpe_v1_files_uploads_id_get_endpoint.call_with_http_info(**kwargs)
575
+
576
+