Skip to main content

Procure to Pay: Provisioning client library for Python

Project description

FactSet

Procure to Pay: Provisioning client library for Python

PyPi Apache-2 license

Allows for Provisioning and Entitlement of FactSet accounts.

Authentication is provided via FactSet's API Key System

Please note that the on-page "Try it out" features do not function. You must authorize against our API and make requests directly againt the endpoints.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1S
  • 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.ProcuretoPayProvisioning

pip

pip install fds.sdk.utils fds.sdk.ProcuretoPayProvisioning

Usage

  1. Generate authentication credentials.
  2. Setup Python environment.
    1. Install and activate python 3.6+. If you're using pyenv:

      pyenv install 3.9.7
      pyenv shell 3.9.7
      
    2. (optional) Install poetry.

  3. Install dependencies.
  4. Run the following:
from fds.sdk.utils.authentication import ConfidentialClient
import fds.sdk.ProcuretoPayProvisioning
from fds.sdk.ProcuretoPayProvisioning.api import entitlement_management_api
from fds.sdk.ProcuretoPayProvisioning.model.inline_response202 import InlineResponse202
from fds.sdk.ProcuretoPayProvisioning.model.manage_product_ids import ManageProductIds
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.ProcuretoPayProvisioning.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.ProcuretoPayProvisioning.Configuration(
#     username = 'USERNAME-SERIAL',
#     password = 'API-KEY'
# )

# Enter a context with an instance of the API client
with fds.sdk.ProcuretoPayProvisioning.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = entitlement_management_api.EntitlementManagementApi(api_client)
    manage_product_ids = ManageProductIds(
        unique_id="unique_id_example",
        product_ids=[
            "product_ids_example",
        ],
    ) # ManageProductIds |  (optional)

    try:
        # Adds listed productIds to an individual
        api_response = api_instance.add_products_post(manage_product_ids=manage_product_ids)
        pprint(api_response)
    except fds.sdk.ProcuretoPayProvisioning.ApiException as e:
        print("Exception when calling EntitlementManagementApi->add_products_post: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://api.factset.com/procuretopay/provisioning

Class Method HTTP request Description
EntitlementManagementApi add_products_post POST /addProducts Adds listed productIds to an individual
EntitlementManagementApi remove_products_post POST /removeProducts Removes listed productIds from an individual
OrderStatusApi transaction_status_get GET /transactionStatus Check status of order by transactionCode
UserManagementApi cancel_individual_post POST /cancelIndividual Cancels an individual's serial and all productIds
UserManagementApi create_individual_post POST /createIndividual Provisions an individual for FactSet
UserManagementApi get_individual_get GET /getIndividual Returns an individual's details by uniqueId
UserManagementApi list_individuals_get GET /listIndividuals Lists all individuals with details at all locations.
UserManagementApi modify_individual_post POST /modifyIndividual Modifies an individual's attributes as determined by the uniqueId in the body of the request. Please note that the uniqueId may not be changed. Fields not changing may be passed as NULL but never empty.

Documentation For Models

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.ProcuretoPayProvisioning.apis and fds.sdk.ProcuretoPayProvisioning.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.ProcuretoPayProvisioning.api.default_api import DefaultApi
  • from fds.sdk.ProcuretoPayProvisioning.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.ProcuretoPayProvisioning
from fds.sdk.ProcuretoPayProvisioning.apis import *
from fds.sdk.ProcuretoPayProvisioning.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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

File details

Details for the file fds.sdk.ProcuretoPayProvisioning-0.9.1-py3-none-any.whl.

File metadata

  • Download URL: fds.sdk.ProcuretoPayProvisioning-0.9.1-py3-none-any.whl
  • Upload date:
  • Size: 73.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.15

File hashes

Hashes for fds.sdk.ProcuretoPayProvisioning-0.9.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6b01441e624f737ee3a838d19f665555c774960732e815b24641d91c1c91f2ff
MD5 7712a72865ee4afe222afe3eacbaa65a
BLAKE2b-256 60763b6f10126423fbf9a5be79f5777dfc95a5cfc6288f26f7004b05cf83c4ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page