Package: fds.sdk.IRNConfiguration
IRN Configuration client library for PythonAllows users to extract, create, update and configure IRN data.This Python package is automatically generated by theOpenAPI Generatorproject:API version: 1Package version: 1.0.8Build package: org.openapitools.codegen.languages.PythonClientCodegenRequirementsPython >= 3.7InstallationPoetrypoetryaddfds.sdk.utilsfds.sdk.IRNConfiguration==1.0.8pippipinstallfds.sdk.utilsfds.sdk.IRNConfiguration==1.0.8UsageGenerate authentication credentials.Setup Python environment.Install and activate python 3.7+. If you're usingpyenv:pyenvinstall3.9.7
pyenvshell3.9.7(optional)Install poetry.Install dependencies.Run the following:fromfds.sdk.utils.authenticationimportConfidentialClientimportfds.sdk.IRNConfigurationfromfds.sdk.IRNConfiguration.apiimportcontacts___custom_fields_apifromfds.sdk.IRNConfiguration.modelsimport*fromdateutil.parserimportparseasdateutil_parserfrompprintimportpprint# See configuration.py for a list of all supported configuration parameters.# Examples for each supported authentication method are below,# choose one that satisfies your use case.# (Preferred) OAuth 2.0: FactSetOAuth2# See https://github.com/FactSet/enterprise-sdk#oauth-20# for information on how to create the app-config.json file## The confidential client instance should be reused in production environments.# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication# for more information on using the ConfidentialClient classconfiguration=fds.sdk.IRNConfiguration.Configuration(fds_oauth_client=ConfidentialClient('/path/to/app-config.json'))# Basic authentication: FactSetApiKey# See https://github.com/FactSet/enterprise-sdk#api-key# for information how to create an API key# configuration = fds.sdk.IRNConfiguration.Configuration(#     username='USERNAME-SERIAL',#     password='API-KEY'# )# Enter a context with an instance of the API clientwithfds.sdk.IRNConfiguration.ApiClient(configuration)asapi_client:# Create an instance of the API classapi_instance=contacts___custom_fields_api.ContactsCustomFieldsApi(api_client)# NOTE: The parameter variable defined below is just an example and may potentially contain non valid values. So please replace this with valid values.contact_custom_field_save_dto=ContactCustomFieldSaveDto(code="code_example",name="name_example",type=ContactCustomFieldType(0),is_hidden=False,is_mandatory=False,field_formula=ContactCustomFieldFormulaDto(formula="formula_example",is_screening=False,symbol="symbol_example",),contact_custom_field_options=[ContactCustomFieldOptionSaveDto(name="name_example",),],)# ContactCustomFieldSaveDto | ContactCustomFieldSaveDto object to save (optional)try:# Create a contact custom field# example passing only required values which don't have defaults set# and optional valuesapi_response=api_instance.create_contact_custom_field(contact_custom_field_save_dto=contact_custom_field_save_dto)pprint(api_response)exceptfds.sdk.IRNConfiguration.ApiExceptionase:print("Exception when calling ContactsCustomFieldsApi->create_contact_custom_field:%s\n"%e)# # Get response, http status code and response headers# try:#     # Create a contact custom field#     api_response, http_status_code, response_headers = api_instance.create_contact_custom_field_with_http_info(contact_custom_field_save_dto=contact_custom_field_save_dto)#     pprint(api_response)#     pprint(http_status_code)#     pprint(response_headers)# except fds.sdk.IRNConfiguration.ApiException as e:#     print("Exception when calling ContactsCustomFieldsApi->create_contact_custom_field: %s\n" % e)# # Get response asynchronous# try:#     # Create a contact custom field#     async_result = api_instance.create_contact_custom_field_async(contact_custom_field_save_dto=contact_custom_field_save_dto)#     api_response = async_result.get()#     pprint(api_response)# except fds.sdk.IRNConfiguration.ApiException as e:#     print("Exception when calling ContactsCustomFieldsApi->create_contact_custom_field: %s\n" % e)# # Get response, http status code and response headers asynchronous# try:#     # Create a contact custom field#     async_result = api_instance.create_contact_custom_field_with_http_info_async(contact_custom_field_save_dto=contact_custom_field_save_dto)#     api_response, http_status_code, response_headers = async_result.get()#     pprint(api_response)#     pprint(http_status_code)#     pprint(response_headers)# except fds.sdk.IRNConfiguration.ApiException as e:#     print("Exception when calling ContactsCustomFieldsApi->create_contact_custom_field: %s\n" % e)Using PandasTo convert an API response to a Pandas DataFrame, it is necessary to transform it first to a dictionary.importpandasaspdresponse_dict=api_response.to_dict()['data']simple_json_response=pd.DataFrame(response_dict)nested_json_response=pd.json_normalize(response_dict)DebuggingThe SDK uses the standard libraryloggingmodule.SettingdebugtoTrueon an instance of theConfigurationclass sets the log-level of related packages toDEBUGand enables additional logging in PythonsHTTP Client.Note: This prints out sensitive information (e.g. the full request and response). Use with care.importloggingimportfds.sdk.IRNConfigurationlogging.basicConfig(level=logging.DEBUG)configuration=fds.sdk.IRNConfiguration.Configuration(...)configuration.debug=TrueConfigure a ProxyYou can pass proxy settings to the Configuration class:proxy: The URL of the proxy to use.proxy_headers: a dictionary to pass additional headers to the proxy (e.g.Proxy-Authorization).importfds.sdk.IRNConfigurationconfiguration=fds.sdk.IRNConfiguration.Configuration(# ...proxy="http://secret:password@localhost:5050",proxy_headers={"Custom-Proxy-Header":"Custom-Proxy-Header-Value"})Custom SSL CertificateTLS/SSL certificate verification can be configured with the following Configuration parameters:ssl_ca_cert: a path to the certificate to use for verification inPEMformat.verify_ssl: setting this toFalsedisables the verification of certificates.
Disabling the verification is not recommended, but it might be useful during
local development or testing.importfds.sdk.IRNConfigurationconfiguration=fds.sdk.IRNConfiguration.Configuration(# ...ssl_ca_cert='/path/to/ca.pem')Documentation for API EndpointsAll URIs are relative tohttps://api.factset.com/research/irnClassMethodHTTP requestDescriptionContactsCustomFieldsApicreate_contact_custom_fieldPOST/v1/contact-custom-fieldsCreate a contact custom fieldContactsCustomFieldsApidelete_contact_custom_fieldDELETE/v1/contact-custom-fields/{contactCustomFieldId}Delete a contact custom fieldContactsCustomFieldsApiget_contact_custom_fieldGET/v1/contact-custom-fields/{contactCustomFieldId}Get a specific Contact custom field's detailsContactsCustomFieldsApiget_contact_custom_fieldsGET/v1/contact-custom-fieldsGet all the contact custom fieldsContactsCustomFieldsApipatch_contact_custom_fieldPATCH/v1/contact-custom-fields/{contactCustomFieldId}Edit a contact custom fieldContactsPhoneNumberTypesApicreate_phone_number_typePOST/v1/phone-number-typesCreate a phone typeContactsPhoneNumberTypesApidelete_phone_number_typeDELETE/v1/phone-number-types/{phoneNumberTypeId}Delete a phone typeContactsPhoneNumberTypesApiget_phone_number_typesGET/v1/phone-number-typesGet list of the phone types configured in your groupContactsPhoneNumberTypesApiupdate_phone_number_typePUT/v1/phone-number-types/{phoneNumberTypeId}Edit a phone typeContactsRelationshipCategoryApicreate_relationship_categoryPOST/v1/relationship-categoriesCreate a relationship categoryContactsRelationshipCategoryApidelete_relationship_categoryDELETE/v1/relationship-categories/{relationshipCategoryId}Delete a relationship categoryContactsRelationshipCategoryApiedit_relationship_categoryPUT/v1/relationship-categories/{relationshipCategoryId}Edit a relationship categoryContactsRelationshipCategoryApiget_relationship_categoriesGET/v1/relationship-categoriesGet list of the relationship categories configured in your groupContactsRelationshipCategoryApiupdate_relationship_category_orderPOST/v1/relationship-categories/reorderReorder relationship categoriesContactsRelationshipsApicreate_contact_relationship_typePOST/v1/relationshipsCreate a relationship typeContactsRelationshipsApidelete_relationshipDELETE/v1/relationships/{relationshipId}Delete a relationship typeContactsRelationshipsApiedit_relationshipPUT/v1/relationships/{relationshipId}Edit a relationship typeContactsRelationshipsApiget_relationshipsGET/v1/relationshipsGet list of the relationships configured in your groupContactsRolesApicreate_contact_rolePOST/v1/contact-rolesCreate contact rolesContactsRolesApidelete_contact_roleDELETE/v1/contact-roles/{contactRoleId}Delete a contact roleContactsRolesApiget_contact_rolesGET/v1/contact-rolesGet list of the contact roles configured in your groupContactsRolesApiupdate_contact_rolePUT/v1/contact-roles/{contactRoleId}Edit a contact roleContactsTypesApicreate_contact_typePOST/v1/contact-typesCreate contact typesContactsTypesApidelete_contact_typeDELETE/v1/contact-types/{contactTypeId}Delete a contact typeContactsTypesApiget_contact_typesGET/v1/contact-typesGet list of the contact types configured in your groupContactsTypesApiupdate_contact_typePUT/v1/contact-types/{contactTypeId}Edit a contact typeCustomSymbolsCustomFieldsApicreate_custom_symbol_custom_fieldPOST/v1/custom-symbol-custom-fieldsCreate a Custom symbol custom fieldCustomSymbolsCustomFieldsApidelete_custom_symbol_custom_fieldDELETE/v1/custom-symbol-custom-fields/{customSymbolCustomFieldId}Delete a Custom symbol custom fieldCustomSymbolsCustomFieldsApiget_custom_symbol_custom_fieldGET/v1/custom-symbol-custom-fields/{customSymbolCustomFieldId}Get a specific Custom symbol custom field's detailsCustomSymbolsCustomFieldsApiget_custom_symbol_custom_fieldsGET/v1/custom-symbol-custom-fieldsGet all the Custom symbol custom fieldsCustomSymbolsCustomFieldsApipatch_custom_symbol_custom_fieldPATCH/v1/custom-symbol-custom-fields/{customSymbolCustomFieldId}Edit a Custom symbol custom fieldCustomSymbolsRelationshipsApicreate_symbol_relationship_typePOST/v1/symbols-relationshipsCreate a symbol relationshipCustomSymbolsRelationshipsApidelete_symbols_relationshipDELETE/v1/symbols-relationships/{symbolsRelationshipId}Delete a symbol relationshipCustomSymbolsRelationshipsApiedit_symbols_relationshipPUT/v1/symbols-relationships/{symbolsRelationshipId}Edit a symbol relationshipCustomSymbolsRelationshipsApiget_symbols_relationshipsGET/v1/symbols-relationshipsGet all the Symbols RelationshipsCustomSymbolsTypesApicreate_custom_symbol_typePOST/v1/custom-symbol-typesCreate a Custom symbol typeCustomSymbolsTypesApidelete_custom_symbol_type_asyncDELETE/v1/custom-symbol-types/{customSymbolTypeId}Delete a Custom symbol typeCustomSymbolsTypesApiget_custom_symbol_typeGET/v1/custom-symbol-types/{customSymbolTypeId}Get a specific Custom symbol type's detailsCustomSymbolsTypesApiget_custom_symbol_typesGET/v1/custom-symbol-typesGet all the custom symbol typesCustomSymbolsTypesApiget_symbol_custom_fields_for_custom_symbol_typeGET/v1/custom-symbol-types/{customSymbolTypeId}/custom-fieldsGet Custom fields for Custom Symbol typeCustomSymbolsTypesApiupdate_custom_symbol_typePUT/v1/custom-symbol-types/{customSymbolTypeId}Edit a Custom symbol typeCustomSymbolsTypesApiupdate_custom_symbol_type_orderPOST/v1/custom-symbol-types/reorderNotesConfigurationApiget_assigned_fact_set_usersGET/v1/usersGet all assigned FactSet usersNotesConfigurationApiget_authorsGET/v1/authorsGet all AuthorsNotesConfigurationApiget_clients_sales_representativeGET/v1/group/client-sales-representativeNotesConfigurationApiget_custom_fieldsGET/v1/custom-fieldsGet all Custom FieldsNotesConfigurationApiget_groupGET/v1/groupGet Group detailsNotesConfigurationApiget_recommendationsGET/v1/recommendationsGet all RecommendationsNotesConfigurationApiget_sentimentsGET/v1/sentimentsGet all SentimentsNotesConfigurationApiget_subjectGET/v1/subjects/{subjectId}Get Subject details for the given Id providedNotesConfigurationApiget_subjectsGET/v1/subjectsGet all SubjectsNotesConfigurationApiget_teamGET/v1/teams/{teamId}Get Team details for the given Id providedNotesConfigurationApiget_teamsGET/v1/teamsGet all TeamsDocumentation For ModelsApprovalLevelConfigDtoApprovalProcessConfigDtoAuthorConfigDtoClientSalesRepresentativeDtoCommentaryConfigDtoContactCustomFieldDtoContactCustomFieldFormulaDtoContactCustomFieldOptionDtoContactCustomFieldOptionSaveDtoContactCustomFieldSaveDtoContactCustomFieldTypeContactRoleDtoContactTypeDtoCreateCustomSymbolCustomFieldDtoCustomFieldConfigDtoCustomSymbolCustomFieldConfigDtoCustomSymbolCustomFieldFormulaConfigDtoCustomSymbolSubTypeDtoCustomSymbolTypeDetailDtoCustomSymbolTypeDtoCustomSymbolTypeSummaryDtoDateSettingsDtoEntityTypeExtendedTextConfigDtoFormulaConfigDtoGroupConfigDtoGroupFieldsDtoHeadlineFormatConfigDtoIdentifierSettingsDtoIntegerConfigDtoLinkSettingsDtoNewItemDtoNoteSettingsDtoNumericConfigDtoOperationOperationTypeOptionsConfigDtoOrganizerSettingsDtoPhoneNumberTypeDtoProblemDetailsRatingConfigDtoRecommendationConfigDtoRecommendationSettingsDtoRelatedContactsSettingsDtoRelatedResearchSettingsDtoRelatedSymbolsSettingsDtoRelationshipCategoryDtoRelationshipCategoryListDtoRelationshipCategorySaveDtoRelationshipDtoRelationshipSaveDtoRelationshipTypeReorderCustomSymbolTypeDtoSaveCustomSymbolTypeDtoSentimentConfigDtoSentimentSettingsDtoSourceSettingsDtoSubjectConfigDtoSubjectSettingsDtoSubjectSummaryDtoSymbolsRelationShipSaveDtoSymbolsRelationshipDtoTeamConfigDtoTeamSettingsDtoTeamSummaryDtoTitleSettingsDtoUpdateCustomSymbolTypeDtoUserConfigDtoDocumentation For AuthorizationFactSetApiKeyType: HTTP basic authenticationFactSetOAuth2Type: OAuthFlow: applicationAuthorization URL:Scopes: N/ANotes for Large OpenAPI documentsIf the OpenAPI document is large, imports in fds.sdk.IRNConfiguration.apis and fds.sdk.IRNConfiguration.models may fail with a
RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:Solution 1:
Use specific imports for apis and models like:from fds.sdk.IRNConfiguration.api.default_api import DefaultApifrom fds.sdk.IRNConfiguration.model.pet import PetSolution 2:
Before importing the package, adjust the maximum recursion limit as shown below:import sys
sys.setrecursionlimit(1500)
import fds.sdk.IRNConfiguration
from fds.sdk.IRNConfiguration.apis import *
from fds.sdk.IRNConfiguration.models import *ContributingPlease refer to thecontributing guide.CopyrightCopyright 2022 FactSet Research Systems IncLicensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License athttp://www.apache.org/licenses/LICENSE-2.0Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.