IRN Contacts client library for Python
Project description
IRN Contacts client library for Python
Allows users to create, update and configure IRN data.
This Python package is automatically generated by the OpenAPI Generator project:
- API version: 1
- Package version: 0.9.1
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
Requirements
- Python >= 3.6
Installation
Poetry
poetry add fds.sdk.utils fds.sdk.IRNContacts
pip
pip install fds.sdk.utils fds.sdk.IRNContacts
Usage
- Generate authentication credentials.
- Setup Python environment.
-
Install and activate python 3.6+. If you're using pyenv:
pyenv install 3.9.7 pyenv shell 3.9.7
-
(optional) Install poetry.
-
- Install dependencies.
- Run the following:
from fds.sdk.utils.authentication import ConfidentialClient
import fds.sdk.IRNContacts
from fds.sdk.IRNContacts.api import contact_custom_fields_api
from fds.sdk.IRNContacts.model.contact_custom_field_dto import ContactCustomFieldDto
from fds.sdk.IRNContacts.model.contact_custom_field_list_dto import ContactCustomFieldListDto
from fds.sdk.IRNContacts.model.contact_custom_field_save_dto import ContactCustomFieldSaveDto
from fds.sdk.IRNContacts.model.operation import Operation
from fds.sdk.IRNContacts.model.problem_details import ProblemDetails
from pprint import pprint
# 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
# See https://github.com/FactSet/enterprise-sdk-utils-python#authentication
# for more information on using the ConfidentialClient class
configuration = fds.sdk.IRNContacts.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.IRNContacts.Configuration(
# username = 'USERNAME-SERIAL',
# password = 'API-KEY'
# )
# Enter a context with an instance of the API client
with fds.sdk.IRNContacts.ApiClient(configuration) as api_client:
# Create an instance of the API class
api_instance = contact_custom_fields_api.ContactCustomFieldsApi(api_client)
contact_custom_field_id = "contactCustomFieldId_example" # str | contactCustomFieldId to delete associated record
try:
# Delete a contact custom field
api_instance.v1_contact_custom_fields_contact_custom_field_id_delete(contact_custom_field_id)
except fds.sdk.IRNContacts.ApiException as e:
print("Exception when calling ContactCustomFieldsApi->v1_contact_custom_fields_contact_custom_field_id_delete: %s\n" % e)
Documentation for API Endpoints
All URIs are relative to https://api-sandbox.factset.com/research/irn
Class | Method | HTTP request | Description |
---|---|---|---|
ContactCustomFieldsApi | v1_contact_custom_fields_contact_custom_field_id_delete | DELETE /v1/contact-custom-fields/{contactCustomFieldId} | Delete a contact custom field |
ContactCustomFieldsApi | v1_contact_custom_fields_contact_custom_field_id_get | GET /v1/contact-custom-fields/{contactCustomFieldId} | Get a specific Contact custom field's details |
ContactCustomFieldsApi | v1_contact_custom_fields_contact_custom_field_id_patch | PATCH /v1/contact-custom-fields/{contactCustomFieldId} | Edit a contact custom field |
ContactCustomFieldsApi | v1_contact_custom_fields_get | GET /v1/contact-custom-fields | Get all the contact custom fields |
ContactCustomFieldsApi | v1_contact_custom_fields_post | POST /v1/contact-custom-fields | Create a contact custom field |
ContactCustomFieldsApi | v1_contact_custom_fields_reorder_post | POST /v1/contact-custom-fields/reorder | Reorder contact custom fields |
ContactRelationshipsApi | v1_contact_relationships_contact_relationship_id_delete | DELETE /v1/contact-relationships/{contactRelationshipId} | Delete a contact relationship |
ContactRelationshipsApi | v1_contact_relationships_contact_relationship_id_get | GET /v1/contact-relationships/{contactRelationshipId} | Get details on a specific contact relationship |
ContactRelationshipsApi | v1_contact_relationships_contact_relationship_id_patch | PATCH /v1/contact-relationships/{contactRelationshipId} | Update a contact relationship |
ContactRelationshipsApi | v1_contact_relationships_get | GET /v1/contact-relationships | Get all the relationships where the given symbol or contact identifier has been tagged in a relationship |
ContactRelationshipsApi | v1_contact_relationships_post | POST /v1/contact-relationships | Create a contact relationship |
ContactRolesApi | v1_contact_roles_contact_role_id_delete | DELETE /v1/contact-roles/{contactRoleId} | Delete a contact role |
ContactRolesApi | v1_contact_roles_contact_role_id_put | PUT /v1/contact-roles/{contactRoleId} | Edit a contact role |
ContactRolesApi | v1_contact_roles_get | GET /v1/contact-roles | Get list of the contact roles configured in your group |
ContactRolesApi | v1_contact_roles_post | POST /v1/contact-roles | Create contact roles |
ContactTypesApi | v1_contact_types_contact_type_id_delete | DELETE /v1/contact-types/{contactTypeId} | Delete a contact type |
ContactTypesApi | v1_contact_types_contact_type_id_put | PUT /v1/contact-types/{contactTypeId} | Edit a contact type |
ContactTypesApi | v1_contact_types_get | GET /v1/contact-types | Get list of the contact types configured in your group |
ContactTypesApi | v1_contact_types_post | POST /v1/contact-types | Create contact types |
ContactsApi | v1_contacts_contact_id_about_get | GET /v1/contacts/{contactId}/about | Get the About field content for a specific contact |
ContactsApi | v1_contacts_contact_id_delete | DELETE /v1/contacts/{contactId} | Delete a contact |
ContactsApi | v1_contacts_contact_id_events_get | GET /v1/contacts/{contactId}/events | Get a contact’s audit history |
ContactsApi | v1_contacts_contact_id_get | GET /v1/contacts/{contactId} | Get all custom field and standard field details on a specific contact |
ContactsApi | v1_contacts_contact_id_patch | PATCH /v1/contacts/{contactId} | Edit a contact’s standard field and custom field data |
ContactsApi | v1_contacts_contact_id_records_get | GET /v1/contacts/{contactId}/records | Get all notes and meetings where a specific contact was tagged |
ContactsApi | v1_contacts_contact_id_relationships_get | GET /v1/contacts/{contactId}/relationships | Returns a list of a contact’s relationships |
ContactsApi | v1_contacts_get | GET /v1/contacts | Get list of all contacts in your group along with some of their standard field data |
ContactsApi | v1_contacts_post | POST /v1/contacts | Create a contact |
PhoneNumberTypesApi | v1_phone_number_types_get | GET /v1/phone-number-types | Get list of the phone types configured in your group |
PhoneNumberTypesApi | v1_phone_number_types_phone_number_type_id_delete | DELETE /v1/phone-number-types/{phoneNumberTypeId} | Delete a phone type |
PhoneNumberTypesApi | v1_phone_number_types_phone_number_type_id_put | PUT /v1/phone-number-types/{phoneNumberTypeId} | Edit a phone type |
PhoneNumberTypesApi | v1_phone_number_types_post | POST /v1/phone-number-types | Create a phone type |
RelationshipCategoriesApi | v1_relationship_categories_get | GET /v1/relationship-categories | Get list of the relationship categories configured in your group |
RelationshipCategoriesApi | v1_relationship_categories_post | POST /v1/relationship-categories | Create a relationship category |
RelationshipCategoriesApi | v1_relationship_categories_relationship_category_id_delete | DELETE /v1/relationship-categories/{relationshipCategoryId} | Delete a relationship category |
RelationshipCategoriesApi | v1_relationship_categories_relationship_category_id_put | PUT /v1/relationship-categories/{relationshipCategoryId} | Edit a relationship category |
RelationshipCategoriesApi | v1_relationship_categories_reorder_post | POST /v1/relationship-categories/reorder | Reorder relationship categories |
RelationshipsApi | v1_relationships_get | GET /v1/relationships | Get list of the relationships configured in your group |
RelationshipsApi | v1_relationships_post | POST /v1/relationships | Create a relationship type |
RelationshipsApi | v1_relationships_relationship_id_delete | DELETE /v1/relationships/{relationshipId} | Delete a relationship type |
RelationshipsApi | v1_relationships_relationship_id_put | PUT /v1/relationships/{relationshipId} | Edit a relationship type |
Documentation For Models
- AlternativeEmailAddressDto
- ContactAddressDto
- ContactCustomFieldDto
- ContactCustomFieldFormulaDto
- ContactCustomFieldListDto
- ContactCustomFieldOptionDto
- ContactCustomFieldOptionSaveDto
- ContactCustomFieldOptionValueDto
- ContactCustomFieldSaveDto
- ContactCustomFieldType
- ContactCustomFieldValueDto
- ContactCustomFieldValueSaveDto
- ContactDto
- ContactEventDto
- ContactEventUpdateDto
- ContactIdNameDto
- ContactPhoneDto
- ContactPhoneSaveDto
- ContactRelationshipDto
- ContactRelationshipSaveDto
- ContactRelationshipTwoSidedDto
- ContactRelationshipTwoSidedSaveDto
- ContactRoleDto
- ContactSaveDto
- ContactSummaryDto
- ContactTypeDto
- EmployerDto
- FormulaConfigDto
- Operation
- PhoneNumberTypeDto
- ProblemDetails
- RecordPreviewDto
- RelationshipCategoryDto
- RelationshipCategoryIdNameDto
- RelationshipCategoryListDto
- RelationshipCategorySaveDto
- RelationshipDto
- RelationshipIdNameDto
- RelationshipSaveDto
- RelationshipSymbolSummaryDto
- RelationshipType
- SymbolType
Documentation For Authorization
FactSetApiKey
- Type: HTTP basic authentication
FactSetOAuth2
- Type: OAuth
- Flow: application
- Authorization URL:
- Scopes: N/A
Notes for Large OpenAPI documents
If the OpenAPI document is large, imports in fds.sdk.IRNContacts.apis and fds.sdk.IRNContacts.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.IRNContacts.api.default_api import DefaultApi
from fds.sdk.IRNContacts.model.pet import Pet
Solution 2: Before importing the package, adjust the maximum recursion limit as shown below:
import sys
sys.setrecursionlimit(1500)
import fds.sdk.IRNContacts
from fds.sdk.IRNContacts.apis import *
from fds.sdk.IRNContacts.models import *
Contributing
Please refer to the contributing guide.
Copyright
Copyright 2022 FactSet Research Systems Inc
Licensed 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 at
http://www.apache.org/licenses/LICENSE-2.0
Unless 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Hashes for fds.sdk.IRNContacts-0.9.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8abe2acb21461240b042c9dc0ca147064f04902de52f66cc3c047c616c2c247b |
|
MD5 | 594ff12eb52e6007a4938114781b5fff |
|
BLAKE2b-256 | f33eda22f680aaaadf8bde2ba15d6743eef1db16a40c64df6851a52c75b60d84 |