fds.sdk.utils 2.0.0__tar.gz → 2.0.1__tar.gz

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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fds.sdk.utils
3
- Version: 2.0.0
3
+ Version: 2.0.1
4
4
  Summary: Utilities for interacting with FactSet APIs.
5
5
  Home-page: https://developer.factset.com
6
6
  License: Apache-2.0
@@ -14,7 +14,7 @@ Classifier: Programming Language :: Python :: 3.9
14
14
  Classifier: Programming Language :: Python :: 3.10
15
15
  Classifier: Programming Language :: Python :: 3.11
16
16
  Classifier: Programming Language :: Python :: 3.12
17
- Requires-Dist: joserfc (>=0.9.0,<0.10.0)
17
+ Requires-Dist: joserfc (>=0.9,<0.12)
18
18
  Requires-Dist: oauthlib (>=3.2.2,<4.0.0)
19
19
  Requires-Dist: requests (>=2.28.2,<3.0.0)
20
20
  Requires-Dist: requests-oauthlib (>=2.0.0,<3.0.0)
@@ -25,6 +25,7 @@ Description-Content-Type: text/markdown
25
25
  # FactSet SDK Utilities for Python
26
26
 
27
27
  [![PyPi](https://img.shields.io/pypi/v/fds.sdk.utils)](https://pypi.org/project/fds.sdk.utils/)
28
+ [![Anaconda-Server Badge](https://anaconda.org/factset/fds.sdk.utils/badges/version.svg)](https://anaconda.org/factset/fds.sdk.utils)
28
29
  [![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
29
30
 
30
31
  This repository contains a collection of utilities that supports FactSet's SDK in Python and facilitate usage of FactSet
@@ -44,6 +45,12 @@ poetry add fds.sdk.utils
44
45
  pip install fds.sdk.utils
45
46
  ```
46
47
 
48
+ ### Conda
49
+
50
+ ```sh
51
+ conda install factset::fds.sdk.utils
52
+ ```
53
+
47
54
  ## Usage
48
55
 
49
56
  This library contains multiple modules, sample usage of each module is below.
@@ -3,6 +3,7 @@
3
3
  # FactSet SDK Utilities for Python
4
4
 
5
5
  [![PyPi](https://img.shields.io/pypi/v/fds.sdk.utils)](https://pypi.org/project/fds.sdk.utils/)
6
+ [![Anaconda-Server Badge](https://anaconda.org/factset/fds.sdk.utils/badges/version.svg)](https://anaconda.org/factset/fds.sdk.utils)
6
7
  [![Apache-2 license](https://img.shields.io/badge/license-Apache2-brightgreen.svg)](https://www.apache.org/licenses/LICENSE-2.0)
7
8
 
8
9
  This repository contains a collection of utilities that supports FactSet's SDK in Python and facilitate usage of FactSet
@@ -22,6 +23,12 @@ poetry add fds.sdk.utils
22
23
  pip install fds.sdk.utils
23
24
  ```
24
25
 
26
+ ### Conda
27
+
28
+ ```sh
29
+ conda install factset::fds.sdk.utils
30
+ ```
31
+
25
32
  ## Usage
26
33
 
27
34
  This library contains multiple modules, sample usage of each module is below.
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "fds.sdk.utils"
3
- version = "2.0.0"
3
+ version = "2.0.1"
4
4
  description = "Utilities for interacting with FactSet APIs."
5
5
  authors = ["FactSet Research Systems"]
6
6
  license = "Apache-2.0"
@@ -21,14 +21,14 @@ python = "^3.8.0"
21
21
  requests-oauthlib = "^2.0.0"
22
22
  requests = "^2.28.2"
23
23
  oauthlib = "^3.2.2"
24
- joserfc = "^0.9.0"
24
+ joserfc = ">=0.9,<0.12"
25
25
 
26
26
  [tool.poetry.dev-dependencies]
27
- pytest = "^8.2.0"
27
+ pytest = "^8.2.2"
28
28
  black = "^24.4.2"
29
29
  pytest-cov = "^5.0.0"
30
30
  pytest-mock = "^3.11.1"
31
- tox = "^4.8.0"
31
+ tox = "^4.15.1"
32
32
  tox-gh-actions = "^3.2.0"
33
33
 
34
34
  [tool.black]
@@ -242,7 +242,7 @@ class ConfidentialClient(OAuth2Client):
242
242
  if not self._cached_token:
243
243
  log.debug("Access Token cache is empty")
244
244
  return False
245
- if time.time() < self._cached_token[CONSTS.TOKEN_EXPIRES_AT]:
245
+ if time.time() < self._cached_token[CONSTS.TOKEN_EXPIRES_AT] - CONSTS.TOKEN_EXPIRY_OFFSET_SECS:
246
246
  return True
247
247
  else:
248
248
  log.debug("Cached access token has expired at %s", self._cached_token[CONSTS.TOKEN_EXPIRES_AT])
@@ -14,6 +14,7 @@ class CONSTS:
14
14
  # access token
15
15
  TOKEN_ACCESS_TOKEN = "access_token"
16
16
  TOKEN_EXPIRES_AT = "expires_at"
17
+ TOKEN_EXPIRY_OFFSET_SECS = 30
17
18
 
18
19
  # config
19
20
  CONFIG_CLIENT_ID = "clientId"
File without changes