fathom-python 0.0.33__py3-none-any.whl → 0.0.34__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.
- fathom_python/_version.py +3 -3
- fathom_python/sdk.py +5 -5
- fathom_python/utils/annotations.py +32 -8
- {fathom_python-0.0.33.dist-info → fathom_python-0.0.34.dist-info}/METADATA +2 -1
- {fathom_python-0.0.33.dist-info → fathom_python-0.0.34.dist-info}/RECORD +6 -6
- {fathom_python-0.0.33.dist-info → fathom_python-0.0.34.dist-info}/WHEEL +0 -0
fathom_python/_version.py
CHANGED
|
@@ -3,10 +3,10 @@
|
|
|
3
3
|
import importlib.metadata
|
|
4
4
|
|
|
5
5
|
__title__: str = "fathom-python"
|
|
6
|
-
__version__: str = "0.0.
|
|
6
|
+
__version__: str = "0.0.34"
|
|
7
7
|
__openapi_doc_version__: str = "1.0.0"
|
|
8
|
-
__gen_version__: str = "2.
|
|
9
|
-
__user_agent__: str = "speakeasy-sdk/python 0.0.
|
|
8
|
+
__gen_version__: str = "2.716.16"
|
|
9
|
+
__user_agent__: str = "speakeasy-sdk/python 0.0.34 2.716.16 1.0.0 fathom-python"
|
|
10
10
|
|
|
11
11
|
try:
|
|
12
12
|
if __package__ is not None:
|
fathom_python/sdk.py
CHANGED
|
@@ -57,7 +57,7 @@ class Fathom(BaseSDK):
|
|
|
57
57
|
"""
|
|
58
58
|
client_supplied = True
|
|
59
59
|
if client is None:
|
|
60
|
-
client = httpx.Client()
|
|
60
|
+
client = httpx.Client(follow_redirects=True)
|
|
61
61
|
client_supplied = False
|
|
62
62
|
|
|
63
63
|
assert issubclass(
|
|
@@ -66,7 +66,7 @@ class Fathom(BaseSDK):
|
|
|
66
66
|
|
|
67
67
|
async_client_supplied = True
|
|
68
68
|
if async_client is None:
|
|
69
|
-
async_client = httpx.AsyncClient()
|
|
69
|
+
async_client = httpx.AsyncClient(follow_redirects=True)
|
|
70
70
|
async_client_supplied = False
|
|
71
71
|
|
|
72
72
|
if debug_logger is None:
|
|
@@ -150,7 +150,7 @@ class Fathom(BaseSDK):
|
|
|
150
150
|
"expires": self.expires,
|
|
151
151
|
}
|
|
152
152
|
|
|
153
|
-
def
|
|
153
|
+
def set(self, token: str, refresh_token: str, expires: int):
|
|
154
154
|
self.token = token
|
|
155
155
|
self.refresh_token = refresh_token
|
|
156
156
|
self.expires = expires
|
|
@@ -217,7 +217,7 @@ class Fathom(BaseSDK):
|
|
|
217
217
|
)
|
|
218
218
|
response.raise_for_status()
|
|
219
219
|
data = response.json()
|
|
220
|
-
token_store.
|
|
220
|
+
token_store.set(
|
|
221
221
|
data["access_token"],
|
|
222
222
|
data.get("refresh_token", ""),
|
|
223
223
|
int(time.time()) + data["expires_in"],
|
|
@@ -241,7 +241,7 @@ class Fathom(BaseSDK):
|
|
|
241
241
|
)
|
|
242
242
|
response.raise_for_status()
|
|
243
243
|
data = response.json()
|
|
244
|
-
token_store.
|
|
244
|
+
token_store.set(
|
|
245
245
|
data["access_token"],
|
|
246
246
|
data.get("refresh_token", ""),
|
|
247
247
|
int(time.time()) + data["expires_in"],
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
from enum import Enum
|
|
4
4
|
from typing import Any, Optional
|
|
5
5
|
|
|
6
|
+
|
|
6
7
|
def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
7
8
|
"""
|
|
8
9
|
Recursively search for the discriminator attribute in a model.
|
|
@@ -25,31 +26,54 @@ def get_discriminator(model: Any, fieldname: str, key: str) -> str:
|
|
|
25
26
|
|
|
26
27
|
if isinstance(field, dict):
|
|
27
28
|
if key in field:
|
|
28
|
-
return f
|
|
29
|
+
return f"{field[key]}"
|
|
29
30
|
|
|
30
31
|
if hasattr(field, fieldname):
|
|
31
32
|
attr = getattr(field, fieldname)
|
|
32
33
|
if isinstance(attr, Enum):
|
|
33
|
-
return f
|
|
34
|
-
return f
|
|
34
|
+
return f"{attr.value}"
|
|
35
|
+
return f"{attr}"
|
|
35
36
|
|
|
36
37
|
if hasattr(field, upper_fieldname):
|
|
37
38
|
attr = getattr(field, upper_fieldname)
|
|
38
39
|
if isinstance(attr, Enum):
|
|
39
|
-
return f
|
|
40
|
-
return f
|
|
40
|
+
return f"{attr.value}"
|
|
41
|
+
return f"{attr}"
|
|
41
42
|
|
|
42
43
|
return None
|
|
43
44
|
|
|
45
|
+
def search_nested_discriminator(obj: Any) -> Optional[str]:
|
|
46
|
+
"""Recursively search for discriminator in nested structures."""
|
|
47
|
+
# First try direct field lookup
|
|
48
|
+
discriminator = get_field_discriminator(obj)
|
|
49
|
+
if discriminator is not None:
|
|
50
|
+
return discriminator
|
|
51
|
+
|
|
52
|
+
# If it's a dict, search in nested values
|
|
53
|
+
if isinstance(obj, dict):
|
|
54
|
+
for value in obj.values():
|
|
55
|
+
if isinstance(value, list):
|
|
56
|
+
# Search in list items
|
|
57
|
+
for item in value:
|
|
58
|
+
nested_discriminator = search_nested_discriminator(item)
|
|
59
|
+
if nested_discriminator is not None:
|
|
60
|
+
return nested_discriminator
|
|
61
|
+
elif isinstance(value, dict):
|
|
62
|
+
# Search in nested dict
|
|
63
|
+
nested_discriminator = search_nested_discriminator(value)
|
|
64
|
+
if nested_discriminator is not None:
|
|
65
|
+
return nested_discriminator
|
|
66
|
+
|
|
67
|
+
return None
|
|
44
68
|
|
|
45
69
|
if isinstance(model, list):
|
|
46
70
|
for field in model:
|
|
47
|
-
discriminator =
|
|
71
|
+
discriminator = search_nested_discriminator(field)
|
|
48
72
|
if discriminator is not None:
|
|
49
73
|
return discriminator
|
|
50
74
|
|
|
51
|
-
discriminator =
|
|
75
|
+
discriminator = search_nested_discriminator(model)
|
|
52
76
|
if discriminator is not None:
|
|
53
77
|
return discriminator
|
|
54
78
|
|
|
55
|
-
raise ValueError(f
|
|
79
|
+
raise ValueError(f"Could not find discriminator field {fieldname} in {model}")
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.3
|
|
2
2
|
Name: fathom-python
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.34
|
|
4
4
|
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
5
|
Author: Speakeasy
|
|
6
6
|
Requires-Python: >=3.9.2
|
|
@@ -143,6 +143,7 @@ with Fathom(
|
|
|
143
143
|
</br>
|
|
144
144
|
|
|
145
145
|
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
146
|
+
|
|
146
147
|
```python
|
|
147
148
|
# Asynchronous Example
|
|
148
149
|
import asyncio
|
|
@@ -3,7 +3,7 @@ fathom_python/_hooks/__init__.py,sha256=9_7W5jAYw8rcO8Kfc-Ty-lB82BHfksAJJpVFb_Ue
|
|
|
3
3
|
fathom_python/_hooks/registration.py,sha256=1QZB41w6If7I9dXiOSQx6dhSc6BPWrnI5Q5bMOr4iVA,624
|
|
4
4
|
fathom_python/_hooks/sdkhooks.py,sha256=SyxWCUZakr1ZlORVhbgZJ-xM5W4QvTTS4Mymtte2LrI,2530
|
|
5
5
|
fathom_python/_hooks/types.py,sha256=OOkf6lkat8zumtftMupq5qK6pigExGTdcBF38RyT_gU,2992
|
|
6
|
-
fathom_python/_version.py,sha256=
|
|
6
|
+
fathom_python/_version.py,sha256=N2LovofZoLcCRWeQ7HeR18VH5b7bZiKON21FXg31cjs,472
|
|
7
7
|
fathom_python/basesdk.py,sha256=HzY3rWonhPH0RZoEfNyWHy9q_eIvEfsVaf1jIMUGHhQ,12214
|
|
8
8
|
fathom_python/errors/__init__.py,sha256=4aL9LIze2oNNs_l3aHDAu2HvD8EB0sMFfA9ikL53Lk4,1818
|
|
9
9
|
fathom_python/errors/apierror.py,sha256=a7BEYi8Bh46jnAALCrTFnavGXRqpaOOISPdBWBLgax8,1283
|
|
@@ -40,12 +40,12 @@ fathom_python/models/transcriptitem.py,sha256=pGg4S32z86vBu0eaSLK1Tf1TvvvTZj10nJ
|
|
|
40
40
|
fathom_python/models/transcriptitemspeaker.py,sha256=GFF9PKJtf0aHaB8x8dievopoT43JUIcOAj70oFi5ilE,547
|
|
41
41
|
fathom_python/models/webhook.py,sha256=ekDvnrsaSU-AvUDA8tFz1SPi18Za6NbWcMTQP2k5wPI,1300
|
|
42
42
|
fathom_python/py.typed,sha256=zrp19r0G21lr2yRiMC0f8MFkQFGj9wMpSbboePMg8KM,59
|
|
43
|
-
fathom_python/sdk.py,sha256=
|
|
43
|
+
fathom_python/sdk.py,sha256=Zp8r36VqLPtoXQGkeYQ6WCxMpg0CJqC9EEmEhTJUOt8,72050
|
|
44
44
|
fathom_python/sdkconfiguration.py,sha256=s06HLCZA48IdYWZd8E9q8AK7WazaxybG7ZdqoWF-e7s,1586
|
|
45
45
|
fathom_python/types/__init__.py,sha256=RArOwSgeeTIva6h-4ttjXwMUeCkz10nAFBL9D-QljI4,377
|
|
46
46
|
fathom_python/types/basemodel.py,sha256=L79WXvTECbSqaJzs8D3ud_KdIWkU7Cx2wbohDAktE9E,1127
|
|
47
47
|
fathom_python/utils/__init__.py,sha256=CAG0O76aEToGKXpT6Ft87Vd-iiQTh4XdBrQ37BVbsiM,5861
|
|
48
|
-
fathom_python/utils/annotations.py,sha256=
|
|
48
|
+
fathom_python/utils/annotations.py,sha256=FvfvVTUj8TUclm4HbGgY5yi2Ap7EzGmu2UPFU4FwC1w,2755
|
|
49
49
|
fathom_python/utils/datetimes.py,sha256=oppAA5e3V35pQov1-FNLKxAaNF1_XWi-bQtyjjql3H8,855
|
|
50
50
|
fathom_python/utils/enums.py,sha256=REU6ydF8gsVL3xaeGX4sMNyiL3q5P9h29-f6Sa6luAE,2633
|
|
51
51
|
fathom_python/utils/eventstreaming.py,sha256=SgFqMcUOYKlrTQ4gAp_dNcKLvDXukeiEMNU3DP8mXk8,6692
|
|
@@ -61,6 +61,6 @@ fathom_python/utils/serializers.py,sha256=Hndks5M_rJXVub_N5lu0gKZQUoEmWrn6PN7R-0
|
|
|
61
61
|
fathom_python/utils/unmarshal_json_response.py,sha256=M1-rdgF0E7flFEKlOODnhlvvrvpdnD-ZF_E31FgEWVA,589
|
|
62
62
|
fathom_python/utils/url.py,sha256=BgGPgcTA6MRK4bF8fjP2dUopN3NzEzxWMXPBVg8NQUA,5254
|
|
63
63
|
fathom_python/utils/values.py,sha256=CcaCXEa3xHhkUDROyXZocN8f0bdITftv9Y0P9lTf0YM,3517
|
|
64
|
-
fathom_python-0.0.
|
|
65
|
-
fathom_python-0.0.
|
|
66
|
-
fathom_python-0.0.
|
|
64
|
+
fathom_python-0.0.34.dist-info/METADATA,sha256=YEF0mhstLh3KBuWqgAJlZ88UmgDaTVZk087eK-qzgMk,20492
|
|
65
|
+
fathom_python-0.0.34.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
66
|
+
fathom_python-0.0.34.dist-info/RECORD,,
|
|
File without changes
|