sfq 0.0.3__py3-none-any.whl → 0.0.4__py3-none-any.whl
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.
sfq/__init__.py
CHANGED
@@ -5,7 +5,7 @@ import os
|
|
5
5
|
import json
|
6
6
|
from urllib.parse import urlparse, quote
|
7
7
|
|
8
|
-
logging.basicConfig(level=logging.INFO)
|
8
|
+
logging.basicConfig(level=logging.INFO, format='[sfq:%(lineno)d - %(levelname)s] %(message)s')
|
9
9
|
|
10
10
|
class SFAuth:
|
11
11
|
def __init__(
|
@@ -108,7 +108,7 @@ class SFAuth:
|
|
108
108
|
"""Automatically refresh the token if it has expired or is missing."""
|
109
109
|
_token_expiration = self._is_token_expired()
|
110
110
|
if self.access_token and not _token_expiration:
|
111
|
-
return
|
111
|
+
return self.access_token
|
112
112
|
|
113
113
|
if not self.access_token:
|
114
114
|
logging.debug("No access token available. Requesting a new one.")
|
@@ -123,6 +123,7 @@ class SFAuth:
|
|
123
123
|
logging.debug("Access token refreshed successfully.")
|
124
124
|
else:
|
125
125
|
logging.error("Failed to refresh access token.")
|
126
|
+
return self.access_token
|
126
127
|
|
127
128
|
|
128
129
|
def _is_token_expired(self):
|
@@ -0,0 +1,5 @@
|
|
1
|
+
sfq/__init__.py,sha256=4MnDoSE32i6H_VF_WFyEN171kcyhfbI7GI4B_QAZMG4,6467
|
2
|
+
sfq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
+
sfq-0.0.4.dist-info/METADATA,sha256=kwZf2zmeERpSoj_GOmDtxKwxFF6N52txZVkEnYWH6NY,4685
|
4
|
+
sfq-0.0.4.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
+
sfq-0.0.4.dist-info/RECORD,,
|
sfq-0.0.3.dist-info/RECORD
DELETED
@@ -1,5 +0,0 @@
|
|
1
|
-
sfq/__init__.py,sha256=vcAXd4v6uyjzAqOril31LG2WG2n3l6OHxPiYQA63uD4,6361
|
2
|
-
sfq/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
3
|
-
sfq-0.0.3.dist-info/METADATA,sha256=y5Ir5XtomFESBbaktjuWzsA2d0Q40qlMIBXx1igISU4,4685
|
4
|
-
sfq-0.0.3.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
5
|
-
sfq-0.0.3.dist-info/RECORD,,
|
File without changes
|