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,296 @@
1
+ Metadata-Version: 2.1
2
+ Name: fds.sdk.FactSetProgrammaticEnvironment
3
+ Version: 0.21.6
4
+ Summary: FactSet Programmatic Environment client library for Python
5
+ Home-page: https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1
6
+ Author: FactSet Research Systems
7
+ License: Apache License, Version 2.0
8
+ Keywords: FactSet,API,SDK
9
+ Platform: UNKNOWN
10
+ Requires-Python: >=3.7
11
+ Description-Content-Type: text/markdown
12
+ License-File: LICENSE
13
+ Requires-Dist: urllib3 (>=1.25.3)
14
+ Requires-Dist: python-dateutil
15
+ Requires-Dist: fds.sdk.utils (>=1.0.0)
16
+
17
+ [![FactSet](https://raw.githubusercontent.com/factset/enterprise-sdk/main/docs/images/factset-logo.svg)](https://www.factset.com)
18
+
19
+ # FactSet Programmatic Environment client library for Python
20
+
21
+ [![PyPi](https://img.shields.io/pypi/v/fds.sdk.FactSetProgrammaticEnvironment)](https://pypi.org/project/fds.sdk.FactSetProgrammaticEnvironment/)
22
+ [![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
23
+
24
+ FactSet Programmatic Environment (FPE) API is an API for users to interact with FPE programmatically, streamlining path from research to production.
25
+
26
+ This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
27
+
28
+ - API version: 1.0.0
29
+ - Package version: 0.21.6
30
+ - Build package: org.openapitools.codegen.languages.PythonClientCodegen
31
+
32
+ ## Requirements
33
+
34
+ * Python >= 3.7
35
+
36
+ ## Installation
37
+
38
+ ### Poetry
39
+
40
+ ```shell
41
+ poetry add fds.sdk.utils fds.sdk.FactSetProgrammaticEnvironment
42
+ ```
43
+
44
+ ### pip
45
+
46
+ ```shell
47
+ pip install fds.sdk.utils fds.sdk.FactSetProgrammaticEnvironment
48
+ ```
49
+
50
+ ## Usage
51
+
52
+ 1. [Generate authentication credentials](../../../../README.md#authentication).
53
+ 2. Setup Python environment.
54
+ 1. Install and activate python 3.7+. If you're using [pyenv](https://github.com/pyenv/pyenv):
55
+
56
+ ```sh
57
+ pyenv install 3.9.7
58
+ pyenv shell 3.9.7
59
+ ```
60
+
61
+ 2. (optional) [Install poetry](https://python-poetry.org/docs/#installation).
62
+ 3. [Install dependencies](#installation).
63
+ 4. Run the following:
64
+
65
+ ```python
66
+ from fds.sdk.utils.authentication import ConfidentialClient
67
+
68
+ import fds.sdk.FactSetProgrammaticEnvironment
69
+ from fds.sdk.FactSetProgrammaticEnvironment.api import calculations_api
70
+ from fds.sdk.FactSetProgrammaticEnvironment.models import *
71
+ from dateutil.parser import parse as dateutil_parser
72
+ from pprint import pprint
73
+
74
+ # See configuration.py for a list of all supported configuration parameters.
75
+
76
+ # Examples for each supported authentication method are below,
77
+ # choose one that satisfies your use case.
78
+
79
+ # (Preferred) OAuth 2.0: FactSetOAuth2
80
+ # See https://github.com/FactSet/enterprise-sdk#oauth-20
81
+ # for information on how to create the app-config.json file
82
+ # See https://github.com/FactSet/enterprise-sdk-utils-python#authentication
83
+ # for more information on using the ConfidentialClient class
84
+ configuration = fds.sdk.FactSetProgrammaticEnvironment.Configuration(
85
+ fds_oauth_client=ConfidentialClient('/path/to/app-config.json')
86
+ )
87
+
88
+ # Basic authentication: FactSetApiKey
89
+ # See https://github.com/FactSet/enterprise-sdk#api-key
90
+ # for information how to create an API key
91
+ # configuration = fds.sdk.FactSetProgrammaticEnvironment.Configuration(
92
+ # username='USERNAME-SERIAL',
93
+ # password='API-KEY'
94
+ # )
95
+
96
+ # Enter a context with an instance of the API client
97
+ with fds.sdk.FactSetProgrammaticEnvironment.ApiClient(configuration) as api_client:
98
+ # Create an instance of the API class
99
+ api_instance = calculations_api.CalculationsApi(api_client)
100
+ # NOTE: The parameter variable defined below is just an example and may potentially contain non valid values. So please replace this with valid values.
101
+ id = "id_example" # str | From url, provided by location header or response body in the calculation start endpoint
102
+
103
+ try:
104
+ # Get calculation status by id
105
+ # example passing only required values which don't have defaults set
106
+ api_response = api_instance.analytics_quant_fpe_v1_calculations_id_get(id)
107
+
108
+ pprint(api_response)
109
+ except fds.sdk.FactSetProgrammaticEnvironment.ApiException as e:
110
+ print("Exception when calling CalculationsApi->analytics_quant_fpe_v1_calculations_id_get: %s\n" % e)
111
+
112
+ # # Get response, http status code and response headers
113
+ # try:
114
+ # # Get calculation status by id
115
+ # api_response, http_status_code, response_headers = api_instance.analytics_quant_fpe_v1_calculations_id_get_with_http_info(id)
116
+
117
+
118
+ # pprint(api_response)
119
+ # pprint(http_status_code)
120
+ # pprint(response_headers)
121
+ # except fds.sdk.FactSetProgrammaticEnvironment.ApiException as e:
122
+ # print("Exception when calling CalculationsApi->analytics_quant_fpe_v1_calculations_id_get: %s\n" % e)
123
+
124
+ # # Get response asynchronous
125
+ # try:
126
+ # # Get calculation status by id
127
+ # async_result = api_instance.analytics_quant_fpe_v1_calculations_id_get_async(id)
128
+ # api_response = async_result.get()
129
+
130
+
131
+ # pprint(api_response)
132
+ # except fds.sdk.FactSetProgrammaticEnvironment.ApiException as e:
133
+ # print("Exception when calling CalculationsApi->analytics_quant_fpe_v1_calculations_id_get: %s\n" % e)
134
+
135
+ # # Get response, http status code and response headers asynchronous
136
+ # try:
137
+ # # Get calculation status by id
138
+ # async_result = api_instance.analytics_quant_fpe_v1_calculations_id_get_with_http_info_async(id)
139
+ # api_response, http_status_code, response_headers = async_result.get()
140
+
141
+
142
+ # pprint(api_response)
143
+ # pprint(http_status_code)
144
+ # pprint(response_headers)
145
+ # except fds.sdk.FactSetProgrammaticEnvironment.ApiException as e:
146
+ # print("Exception when calling CalculationsApi->analytics_quant_fpe_v1_calculations_id_get: %s\n" % e)
147
+
148
+ ```
149
+
150
+ ### Using Pandas
151
+
152
+ To convert an API response to a Pandas DataFrame, it is necessary to transform it first to a dictionary.
153
+ ```python
154
+ import pandas as pd
155
+
156
+ response_dict = api_response.to_dict()['data']
157
+
158
+ simple_json_response = pd.DataFrame(response_dict)
159
+ nested_json_response = pd.json_normalize(response_dict)
160
+ ```
161
+
162
+ ### Debugging
163
+
164
+ The SDK uses the standard library [`logging`](https://docs.python.org/3/library/logging.html#module-logging) module.
165
+
166
+ Setting `debug` to `True` on an instance of the `Configuration` class sets the log-level of related packages to `DEBUG`
167
+ and enables additional logging in Pythons [HTTP Client](https://docs.python.org/3/library/http.client.html).
168
+
169
+ **Note**: This prints out sensitive information (e.g. the full request and response). Use with care.
170
+
171
+ ```python
172
+ import logging
173
+ import fds.sdk.FactSetProgrammaticEnvironment
174
+
175
+ logging.basicConfig(level=logging.DEBUG)
176
+
177
+ configuration = fds.sdk.FactSetProgrammaticEnvironment.Configuration(...)
178
+ configuration.debug = True
179
+ ```
180
+
181
+ ### Configure a Proxy
182
+
183
+ You can pass proxy settings to the Configuration class:
184
+
185
+ * `proxy`: The URL of the proxy to use.
186
+ * `proxy_headers`: a dictionary to pass additional headers to the proxy (e.g. `Proxy-Authorization`).
187
+
188
+ ```python
189
+ import fds.sdk.FactSetProgrammaticEnvironment
190
+
191
+ configuration = fds.sdk.FactSetProgrammaticEnvironment.Configuration(
192
+ # ...
193
+ proxy="http://secret:password@localhost:5050",
194
+ proxy_headers={
195
+ "Custom-Proxy-Header": "Custom-Proxy-Header-Value"
196
+ }
197
+ )
198
+ ```
199
+
200
+ ### Custom SSL Certificate
201
+
202
+ TLS/SSL certificate verification can be configured with the following Configuration parameters:
203
+
204
+ * `ssl_ca_cert`: a path to the certificate to use for verification in `PEM` format.
205
+ * `verify_ssl`: setting this to `False` disables the verification of certificates.
206
+ Disabling the verification is not recommended, but it might be useful during
207
+ local development or testing.
208
+
209
+ ```python
210
+ import fds.sdk.FactSetProgrammaticEnvironment
211
+
212
+ configuration = fds.sdk.FactSetProgrammaticEnvironment.Configuration(
213
+ # ...
214
+ ssl_ca_cert='/path/to/ca.pem'
215
+ )
216
+ ```
217
+
218
+
219
+ ## Documentation for API Endpoints
220
+
221
+ All URIs are relative to *https://api.factset.com*
222
+
223
+ Class | Method | HTTP request | Description
224
+ ------------ | ------------- | ------------- | -------------
225
+ *CalculationsApi* | [**analytics_quant_fpe_v1_calculations_id_get**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/CalculationsApi.md#analytics_quant_fpe_v1_calculations_id_get) | **GET** /analytics/quant/fpe/v1/calculations/{id} | Get calculation status by id
226
+ *CalculationsApi* | [**analytics_quant_fpe_v1_calculations_id_log_get**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/CalculationsApi.md#analytics_quant_fpe_v1_calculations_id_log_get) | **GET** /analytics/quant/fpe/v1/calculations/{id}/log | Get calculation log for a specific calculation
227
+ *CalculationsApi* | [**analytics_quant_fpe_v1_calculations_id_output_get**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/CalculationsApi.md#analytics_quant_fpe_v1_calculations_id_output_get) | **GET** /analytics/quant/fpe/v1/calculations/{id}/output | Get calculation output for a specific calculation
228
+ *CalculationsApi* | [**analytics_quant_fpe_v1_calculations_post**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/CalculationsApi.md#analytics_quant_fpe_v1_calculations_post) | **POST** /analytics/quant/fpe/v1/calculations | Starts a new script calculation
229
+ *FilesApi* | [**analytics_quant_fpe_v1_files_server_file_post**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/FilesApi.md#analytics_quant_fpe_v1_files_server_file_post) | **POST** /analytics/quant/fpe/v1/files/{server}/{file} | Starts a file upload
230
+ *FilesApi* | [**analytics_quant_fpe_v1_files_uploads_id_get**](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/FilesApi.md#analytics_quant_fpe_v1_files_uploads_id_get) | **GET** /analytics/quant/fpe/v1/files/uploads/{id} | Get upload status by id
231
+
232
+
233
+ ## Documentation For Models
234
+
235
+ - [Calculation](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/Calculation.md)
236
+ - [CalculationStatus](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/CalculationStatus.md)
237
+ - [FileUploadStatus](https://github.com/FactSet/enterprise-sdk/tree/main/code/python/FactSetProgrammaticEnvironment/v1/docs/FileUploadStatus.md)
238
+
239
+
240
+ ## Documentation For Authorization
241
+
242
+
243
+ ## FactSetApiKey
244
+
245
+ - **Type**: HTTP basic authentication
246
+
247
+
248
+ ## FactSetOAuth2
249
+
250
+ - **Type**: OAuth
251
+ - **Flow**: application
252
+ - **Authorization URL**:
253
+ - **Scopes**: N/A
254
+
255
+
256
+ ## Notes for Large OpenAPI documents
257
+ If the OpenAPI document is large, imports in fds.sdk.FactSetProgrammaticEnvironment.apis and fds.sdk.FactSetProgrammaticEnvironment.models may fail with a
258
+ RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
259
+
260
+ Solution 1:
261
+ Use specific imports for apis and models like:
262
+ - `from fds.sdk.FactSetProgrammaticEnvironment.api.default_api import DefaultApi`
263
+ - `from fds.sdk.FactSetProgrammaticEnvironment.model.pet import Pet`
264
+
265
+ Solution 2:
266
+ Before importing the package, adjust the maximum recursion limit as shown below:
267
+ ```
268
+ import sys
269
+ sys.setrecursionlimit(1500)
270
+ import fds.sdk.FactSetProgrammaticEnvironment
271
+ from fds.sdk.FactSetProgrammaticEnvironment.apis import *
272
+ from fds.sdk.FactSetProgrammaticEnvironment.models import *
273
+ ```
274
+
275
+ ## Contributing
276
+
277
+ Please refer to the [contributing guide](../../../../CONTRIBUTING.md).
278
+
279
+ ## Copyright
280
+
281
+ Copyright 2022 FactSet Research Systems Inc
282
+
283
+ Licensed under the Apache License, Version 2.0 (the "License");
284
+ you may not use this file except in compliance with the License.
285
+ You may obtain a copy of the License at
286
+
287
+ http://www.apache.org/licenses/LICENSE-2.0
288
+
289
+ Unless required by applicable law or agreed to in writing, software
290
+ distributed under the License is distributed on an "AS IS" BASIS,
291
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
292
+ See the License for the specific language governing permissions and
293
+ limitations under the License.
294
+
295
+
296
+
@@ -0,0 +1,22 @@
1
+ fds/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
2
+ fds/sdk/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
3
+ fds/sdk/FactSetProgrammaticEnvironment/__init__.py,sha256=SHrQtvBT_9K6PPnqlOVOEukslgckb9aAHMpcIPI8AKc,1001
4
+ fds/sdk/FactSetProgrammaticEnvironment/api_client.py,sha256=-r8KnZWU6gpqCgFz5TmeiAIoVhDgH6JoaSj0FT1kbMQ,40040
5
+ fds/sdk/FactSetProgrammaticEnvironment/configuration.py,sha256=fG9RumIArOa9Q-wfpF1LCdwqIexwvqv3VXTklcXElhk,18469
6
+ fds/sdk/FactSetProgrammaticEnvironment/exceptions.py,sha256=SPfSowMW0J4XfVzRY-YchUZF0JGv-80dM43134wHHMM,5130
7
+ fds/sdk/FactSetProgrammaticEnvironment/model_utils.py,sha256=MsWqMKyYgcJJKGJEOLPiWfLP6I5ylD2hUaqSa_Aj2C4,82222
8
+ fds/sdk/FactSetProgrammaticEnvironment/rest.py,sha256=8gM_iC_giwTcX-ZuodEzlPxdDICCHmgDysxf2Hh2Qf8,14278
9
+ fds/sdk/FactSetProgrammaticEnvironment/api/__init__.py,sha256=nY_RPsk_ZTxJwDv62FvOOnTqlzafOAbuKz4I1lswTQc,247
10
+ fds/sdk/FactSetProgrammaticEnvironment/api/calculations_api.py,sha256=zx42_rjV6Qxe1cXEDZAwR_A9tf3P792VDmpHC7ZFvmU,45272
11
+ fds/sdk/FactSetProgrammaticEnvironment/api/files_api.py,sha256=R8A31cpPjZ2W0teltJO2J71My3TRlpizePrqXoUlNLc,24789
12
+ fds/sdk/FactSetProgrammaticEnvironment/apis/__init__.py,sha256=WvR3Z-vML3VLiNzabkNkC-0hVqxr7wE_F6fLMFRZqbo,585
13
+ fds/sdk/FactSetProgrammaticEnvironment/model/__init__.py,sha256=N49d9K35V_Hd5lOHWcMeVRl0Iy_-L-03rZgfKXwlESM,348
14
+ fds/sdk/FactSetProgrammaticEnvironment/model/calculation.py,sha256=ILL7WKi0qSyj6Scx0TjaAlYAxItaB_rGmGgPqDetrkw,11600
15
+ fds/sdk/FactSetProgrammaticEnvironment/model/calculation_status.py,sha256=vuvLHr1U3WsAHH0k73glY0lYj2nML-KStfqNI2Ct4Mk,11526
16
+ fds/sdk/FactSetProgrammaticEnvironment/model/file_upload_status.py,sha256=_ugh0jFSXDm8pOlDTc-DYveWWowtmoEsvNNZuQt1DmA,11547
17
+ fds/sdk/FactSetProgrammaticEnvironment/models/__init__.py,sha256=hhGG-bOrBTbOBnWJCd9NjuT3VENw1mALPGzqqSpiDwY,668
18
+ fds.sdk.FactSetProgrammaticEnvironment-0.21.6.dist-info/LICENSE,sha256=o360nv5Th1nES3Sbtp01thapHTMCT0CzuS7uq_ro8fw,11358
19
+ fds.sdk.FactSetProgrammaticEnvironment-0.21.6.dist-info/METADATA,sha256=yyBfYrcDo5PTKA-pf7pkLfU-z3a6TzII8eIIjJJLbLk,12212
20
+ fds.sdk.FactSetProgrammaticEnvironment-0.21.6.dist-info/WHEEL,sha256=G16H4A3IeoQmnOrYV4ueZGKSjhipXx8zc8nu9FGlvMA,92
21
+ fds.sdk.FactSetProgrammaticEnvironment-0.21.6.dist-info/top_level.txt,sha256=52v1bB-782Xh07STWqzml3q9GVhwaqsY3NCEMiH3Hnc,4
22
+ fds.sdk.FactSetProgrammaticEnvironment-0.21.6.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: bdist_wheel (0.37.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+