Skip to main content
FactSet

FactSet SDK Utilities for Python

PyPi Anaconda-Server Badge Apache-2 license Python

This repository contains a collection of utilities that supports FactSet's SDK in Python and facilitate usage of FactSet APIs.

Requires Python 3.10 or higher. Python 3.8 and 3.9 are end-of-life and no longer supported as of v3.0.0.

Installation

Poetry

poetry add fds.sdk.utils

pip

pip install fds.sdk.utils

Conda

conda install factset::fds.sdk.utils

Usage

This library contains multiple modules, sample usage of each module is below.

Authentication

First, you need to create the OAuth 2.0 client configuration that will be used to authenticate against FactSet's APIs:

  1. Create a new application on FactSet's Developer Portal.
  2. When prompted, download the configuration file and move it to your development environment.
from fds.sdk.utils.authentication import ConfidentialClient
import requests

# The ConfidentialClient instance should be reused in production environments.
client = ConfidentialClient(config_path="/path/to/config.json")
res = requests.get(
    "https://api.factset.com/analytics/lookups/v3/currencies",
    headers={"Authorization": "Bearer " + client.get_access_token()},
)

print(res.text)

Configure a Proxy

You can pass proxy settings to the ConfidentialClient if necessary. The proxy parameter takes a URL to tell the request library which proxy should be used.

If necessary it is possible to set custom proxy_headers as dictionary.

from fds.sdk.utils.authentication import ConfidentialClient

client = ConfidentialClient(
    config_path="/path/to/config.json",
    proxy="http://secret:password@localhost:5050",
    proxy_headers={"Custom-Proxy-Header": "Custom-Proxy-Header-Value"},
)

Custom SSL Certificate

If you have proxies or firewalls which are using custom TLS certificates, you are able to pass a custom pem file (ssl_ca_cert parameter) so that the request library is able to verify the validity of that certificate. If a ca cert is passed it is validated regardless if verify_ssl is set to false.

With verify_ssl it is possible to disable the verifications of certificates. Disabling the verification is not recommended, but it might be useful during local development or testing

from fds.sdk.utils.authentication import ConfidentialClient

client = ConfidentialClient(
    config_path="/path/to/config.json", verify_ssl=True, ssl_ca_cert="/path/to/ca.pem"
)

Request Retries

In case the request retry behaviour should be customized, it is possible to pass a urllib3.Retry object to the ConfidentialClient.

from urllib3 import Retry
from fds.sdk.utils.authentication import ConfidentialClient

client = ConfidentialClient(
    config_path="/path/to/config.json",
    retry=Retry(total=5, backoff_factor=0.1, status_forcelist=[500, 502, 503, 504]),
)

OAuth 2.0 Scopes

By default no scope is requested and the authorization server determines the granted scopes based on the client's identity. If you need to request one or more specific OAuth 2.0 scopes, pass them as a list to the scope parameter.

from fds.sdk.utils.authentication import ConfidentialClient

client = ConfidentialClient(
    config_path="/path/to/config.json", scope=["factset.api.read"]
)

Modules

Information about the various utility modules contained in this library can be found below.

Authentication

The authentication module provides helper classes that facilitate OAuth 2.0 authentication and authorization with FactSet's APIs. Currently the module has support for the client credentials flow.

Each helper class in the module has the following features:

  • Accepts a configuration file or dict that contains information about the OAuth 2.0 client, including the client ID and private key.
  • Performs authentication with FactSet's OAuth 2.0 authorization server and retrieves an access token.
  • Caches the access token for reuse and requests a new access token as needed when one expires.
    • In order for this to work correctly, the helper class instance should be reused in production environments.

Configuration

Classes in the authentication module require OAuth 2.0 client configuration information to be passed to constructors through a JSON-formatted file or a dict. In either case the format is the same:

{
  "name": "Application name registered with FactSet's Developer Portal",
  "clientId": "OAuth 2.0 Client ID registered with FactSet's Developer Portal",
  "clientAuthType": "Confidential",
  "owners": [
    "USERNAME-SERIAL"
  ],
  "jwk": {
    "kty": "RSA",
    "use": "sig",
    "alg": "RS256",
    "kid": "Key ID",
    "d": "ECC Private Key",
    "n": "Modulus",
    "e": "Exponent",
    "p": "First Prime Factor",
    "q": "Second Prime Factor",
    "dp": "First Factor CRT Exponent",
    "dq": "Second Factor CRT Exponent",
    "qi": "First CRT Coefficient"
  }
}

If you're just starting out, you can visit FactSet's Developer Portal to create a new application and download a configuration file in this format.

If you're creating and managing your signing key pair yourself, see the required JWK parameters for public-private key pairs.

Debugging

This library uses the logging module to log various messages that will help you understand what it's doing. You can increase the log level to see additional debug information using standard conventions. For example:

logging.getLogger("fds.sdk.utils").setLevel(logging.DEBUG)

or

logging.getLogger("fds.sdk.utils.authentication").setLevel(logging.DEBUG)

Contributing

Please refer to the contributing guide.

Copyright

Copyright 2026 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.

Metadata

Release files for fds.sdk.utils 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for fds.sdk.utils 3.1.0
File Size Uploaded Provenance Actions
fds_sdk_utils-3.1.0.tar.gz 9.3 kB Without provenance Details for fds_sdk_utils-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for fds.sdk.utils 3.1.0
File Interpreter ABI Platform Actions
fds_sdk_utils-3.1.0-py3-none-any.whl Python 3 none any Details for fds_sdk_utils-3.1.0-py3-none-any.whl

Total release size: 20.2 kB

Release files / fds_sdk_utils-3.1.0.tar.gz

Download URL fds_sdk_utils-3.1.0.tar.gz
Size 9.3 kB
Tags Source
SHA-256 checksum
How to use checksums
c4a1b2862ae8b9f521e888a9b2a4ab3b96d066f49e30ecef4ba2bb9db69b5d0d
BLAKE2b-256 checksum
How to use checksums
3746b644bf75ada63a211105ec42a5d21c8187a55a45200e553eb6f43377a1bf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / fds_sdk_utils-3.1.0-py3-none-any.whl

Download URL fds_sdk_utils-3.1.0-py3-none-any.whl
Size 10.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b81d6eb2eaf3edbb24588583aa73e175d84bd7b2813ad474074ab2dfc04cc755
BLAKE2b-256 checksum
How to use checksums
883ef082b4aa3192d23f965e3f7eb9422b33522f6a18908ddb92fe6554f1b1e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for fds.sdk.utils 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page