fathom-python 0.0.28__tar.gz → 0.0.30__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.
Files changed (129) hide show
  1. fathom_python-0.0.30/PKG-INFO +657 -0
  2. fathom_python-0.0.30/README.md +636 -0
  3. fathom_python-0.0.30/py.typed +1 -0
  4. fathom_python-0.0.30/pyproject.toml +59 -0
  5. fathom_python-0.0.30/src/fathom_python/__init__.py +17 -0
  6. fathom_python-0.0.30/src/fathom_python/_hooks/__init__.py +5 -0
  7. fathom_python-0.0.30/src/fathom_python/_hooks/registration.py +13 -0
  8. fathom_python-0.0.30/src/fathom_python/_hooks/sdkhooks.py +76 -0
  9. fathom_python-0.0.30/src/fathom_python/_hooks/types.py +112 -0
  10. fathom_python-0.0.30/src/fathom_python/_version.py +15 -0
  11. fathom_python-0.0.30/src/fathom_python/basesdk.py +354 -0
  12. fathom_python-0.0.30/src/fathom_python/errors/__init__.py +45 -0
  13. fathom_python-0.0.30/src/fathom_python/errors/apierror.py +38 -0
  14. fathom_python-0.0.30/src/fathom_python/errors/fathomerror.py +26 -0
  15. fathom_python-0.0.30/src/fathom_python/errors/no_response_error.py +13 -0
  16. fathom_python-0.0.30/src/fathom_python/errors/responsevalidationerror.py +25 -0
  17. fathom_python-0.0.30/src/fathom_python/httpclient.py +126 -0
  18. fathom_python-0.0.30/src/fathom_python/models/__init__.py +212 -0
  19. fathom_python-0.0.30/src/fathom_python/models/actionitem.py +33 -0
  20. fathom_python-0.0.30/src/fathom_python/models/assignee.py +50 -0
  21. fathom_python-0.0.30/src/fathom_python/models/createwebhookop.py +36 -0
  22. fathom_python-0.0.30/src/fathom_python/models/crmcompanymatch.py +16 -0
  23. fathom_python-0.0.30/src/fathom_python/models/crmcontactmatch.py +19 -0
  24. fathom_python-0.0.30/src/fathom_python/models/crmdealmatch.py +21 -0
  25. fathom_python-0.0.30/src/fathom_python/models/crmmatches.py +36 -0
  26. fathom_python-0.0.30/src/fathom_python/models/deletewebhookop.py +18 -0
  27. fathom_python-0.0.30/src/fathom_python/models/fathomuser.py +50 -0
  28. fathom_python-0.0.30/src/fathom_python/models/gettokenop.py +74 -0
  29. fathom_python-0.0.30/src/fathom_python/models/invitee.py +65 -0
  30. fathom_python-0.0.30/src/fathom_python/models/listmeetingsop.py +175 -0
  31. fathom_python-0.0.30/src/fathom_python/models/listteammembersop.py +28 -0
  32. fathom_python-0.0.30/src/fathom_python/models/listteamsop.py +20 -0
  33. fathom_python-0.0.30/src/fathom_python/models/meeting.py +127 -0
  34. fathom_python-0.0.30/src/fathom_python/models/meetinglistresponse.py +52 -0
  35. fathom_python-0.0.30/src/fathom_python/models/meetingsummary.py +49 -0
  36. fathom_python-0.0.30/src/fathom_python/models/schemetokenrequeststandalone.py +42 -0
  37. fathom_python-0.0.30/src/fathom_python/models/security.py +52 -0
  38. fathom_python-0.0.30/src/fathom_python/models/team.py +17 -0
  39. fathom_python-0.0.30/src/fathom_python/models/teamlistresponse.py +52 -0
  40. fathom_python-0.0.30/src/fathom_python/models/teammember.py +20 -0
  41. fathom_python-0.0.30/src/fathom_python/models/teammemberlistresponse.py +52 -0
  42. fathom_python-0.0.30/src/fathom_python/models/transcriptitem.py +22 -0
  43. fathom_python-0.0.30/src/fathom_python/models/transcriptitemspeaker.py +17 -0
  44. fathom_python-0.0.30/src/fathom_python/models/webhook.py +39 -0
  45. fathom_python-0.0.30/src/fathom_python/py.typed +1 -0
  46. fathom_python-0.0.30/src/fathom_python/sdk.py +1433 -0
  47. fathom_python-0.0.30/src/fathom_python/sdkconfiguration.py +48 -0
  48. fathom_python-0.0.30/src/fathom_python/types/__init__.py +21 -0
  49. fathom_python-0.0.30/src/fathom_python/types/basemodel.py +39 -0
  50. fathom_python-0.0.30/src/fathom_python/utils/__init__.py +187 -0
  51. fathom_python-0.0.30/src/fathom_python/utils/annotations.py +55 -0
  52. fathom_python-0.0.30/src/fathom_python/utils/datetimes.py +23 -0
  53. fathom_python-0.0.30/src/fathom_python/utils/enums.py +74 -0
  54. fathom_python-0.0.30/src/fathom_python/utils/eventstreaming.py +238 -0
  55. fathom_python-0.0.30/src/fathom_python/utils/forms.py +223 -0
  56. fathom_python-0.0.30/src/fathom_python/utils/headers.py +136 -0
  57. fathom_python-0.0.30/src/fathom_python/utils/logger.py +27 -0
  58. fathom_python-0.0.30/src/fathom_python/utils/metadata.py +118 -0
  59. fathom_python-0.0.30/src/fathom_python/utils/queryparams.py +205 -0
  60. fathom_python-0.0.30/src/fathom_python/utils/requestbodies.py +66 -0
  61. fathom_python-0.0.30/src/fathom_python/utils/retries.py +217 -0
  62. fathom_python-0.0.30/src/fathom_python/utils/security.py +220 -0
  63. fathom_python-0.0.30/src/fathom_python/utils/serializers.py +249 -0
  64. fathom_python-0.0.30/src/fathom_python/utils/unmarshal_json_response.py +24 -0
  65. fathom_python-0.0.30/src/fathom_python/utils/url.py +155 -0
  66. fathom_python-0.0.30/src/fathom_python/utils/values.py +137 -0
  67. fathom_python-0.0.28/PKG-INFO +0 -151
  68. fathom_python-0.0.28/README.md +0 -123
  69. fathom_python-0.0.28/pyproject.toml +0 -85
  70. fathom_python-0.0.28/src/fathom/__init__.py +0 -55
  71. fathom_python-0.0.28/src/fathom/base_client.py +0 -142
  72. fathom_python-0.0.28/src/fathom/client.py +0 -25
  73. fathom_python-0.0.28/src/fathom/core/__init__.py +0 -55
  74. fathom_python-0.0.28/src/fathom/core/api_error.py +0 -23
  75. fathom_python-0.0.28/src/fathom/core/client_wrapper.py +0 -55
  76. fathom_python-0.0.28/src/fathom/core/datetime_utils.py +0 -28
  77. fathom_python-0.0.28/src/fathom/core/file.py +0 -67
  78. fathom_python-0.0.28/src/fathom/core/force_multipart.py +0 -16
  79. fathom_python-0.0.28/src/fathom/core/http_client.py +0 -543
  80. fathom_python-0.0.28/src/fathom/core/http_response.py +0 -55
  81. fathom_python-0.0.28/src/fathom/core/jsonable_encoder.py +0 -100
  82. fathom_python-0.0.28/src/fathom/core/pagination.py +0 -82
  83. fathom_python-0.0.28/src/fathom/core/pydantic_utilities.py +0 -255
  84. fathom_python-0.0.28/src/fathom/core/query_encoder.py +0 -58
  85. fathom_python-0.0.28/src/fathom/core/remove_none_from_dict.py +0 -11
  86. fathom_python-0.0.28/src/fathom/core/request_options.py +0 -35
  87. fathom_python-0.0.28/src/fathom/core/serialization.py +0 -276
  88. fathom_python-0.0.28/src/fathom/environment.py +0 -7
  89. fathom_python-0.0.28/src/fathom/errors/__init__.py +0 -10
  90. fathom_python-0.0.28/src/fathom/errors/bad_request_error.py +0 -10
  91. fathom_python-0.0.28/src/fathom/errors/not_found_error.py +0 -10
  92. fathom_python-0.0.28/src/fathom/errors/too_many_requests_error.py +0 -10
  93. fathom_python-0.0.28/src/fathom/errors/unauthorized_error.py +0 -10
  94. fathom_python-0.0.28/src/fathom/meetings/__init__.py +0 -7
  95. fathom_python-0.0.28/src/fathom/meetings/client.py +0 -250
  96. fathom_python-0.0.28/src/fathom/meetings/raw_client.py +0 -349
  97. fathom_python-0.0.28/src/fathom/meetings/types/__init__.py +0 -7
  98. fathom_python-0.0.28/src/fathom/meetings/types/list_meetings_request_meeting_type.py +0 -5
  99. fathom_python-0.0.28/src/fathom/py.typed +0 -0
  100. fathom_python-0.0.28/src/fathom/team_members/__init__.py +0 -4
  101. fathom_python-0.0.28/src/fathom/team_members/client.py +0 -119
  102. fathom_python-0.0.28/src/fathom/team_members/raw_client.py +0 -210
  103. fathom_python-0.0.28/src/fathom/teams/__init__.py +0 -4
  104. fathom_python-0.0.28/src/fathom/teams/client.py +0 -105
  105. fathom_python-0.0.28/src/fathom/teams/raw_client.py +0 -192
  106. fathom_python-0.0.28/src/fathom/types/__init__.py +0 -45
  107. fathom_python-0.0.28/src/fathom/types/action_item.py +0 -33
  108. fathom_python-0.0.28/src/fathom/types/assignee.py +0 -21
  109. fathom_python-0.0.28/src/fathom/types/crm_company_match.py +0 -20
  110. fathom_python-0.0.28/src/fathom/types/crm_contact_match.py +0 -21
  111. fathom_python-0.0.28/src/fathom/types/crm_deal_match.py +0 -25
  112. fathom_python-0.0.28/src/fathom/types/crm_matches.py +0 -30
  113. fathom_python-0.0.28/src/fathom/types/fathom_user.py +0 -21
  114. fathom_python-0.0.28/src/fathom/types/invitee.py +0 -22
  115. fathom_python-0.0.28/src/fathom/types/meeting.py +0 -47
  116. fathom_python-0.0.28/src/fathom/types/meeting_list_response.py +0 -22
  117. fathom_python-0.0.28/src/fathom/types/meeting_meeting_type.py +0 -5
  118. fathom_python-0.0.28/src/fathom/types/meeting_summary.py +0 -23
  119. fathom_python-0.0.28/src/fathom/types/team.py +0 -21
  120. fathom_python-0.0.28/src/fathom/types/team_list_response.py +0 -22
  121. fathom_python-0.0.28/src/fathom/types/team_member.py +0 -22
  122. fathom_python-0.0.28/src/fathom/types/team_member_list_response.py +0 -22
  123. fathom_python-0.0.28/src/fathom/types/transcript_item.py +0 -25
  124. fathom_python-0.0.28/src/fathom/types/transcript_item_speaker.py +0 -20
  125. fathom_python-0.0.28/src/fathom/types/webhook.py +0 -35
  126. fathom_python-0.0.28/src/fathom/version.py +0 -3
  127. fathom_python-0.0.28/src/fathom/webhooks/__init__.py +0 -4
  128. fathom_python-0.0.28/src/fathom/webhooks/client.py +0 -209
  129. fathom_python-0.0.28/src/fathom/webhooks/raw_client.py +0 -383
@@ -0,0 +1,657 @@
1
+ Metadata-Version: 2.3
2
+ Name: fathom-python
3
+ Version: 0.0.30
4
+ Summary: Python Client SDK Generated by Speakeasy.
5
+ Author: Speakeasy
6
+ Requires-Python: >=3.9.2
7
+ Classifier: Programming Language :: Python :: 3
8
+ Classifier: Programming Language :: Python :: 3.10
9
+ Classifier: Programming Language :: Python :: 3.11
10
+ Classifier: Programming Language :: Python :: 3.12
11
+ Classifier: Programming Language :: Python :: 3.13
12
+ Requires-Dist: httpcore (>=1.0.9)
13
+ Requires-Dist: httpx (>=0.28.1)
14
+ Requires-Dist: jsonpath-python (>=1.0.6)
15
+ Requires-Dist: pydantic (>=2.11.2)
16
+ Requires-Dist: requests (>=2.32.4,<3.0.0)
17
+ Requires-Dist: svix (>=1.65.0,<2.0.0)
18
+ Requires-Dist: types-requests (>=2.32.4,<3.0.0)
19
+ Description-Content-Type: text/markdown
20
+
21
+ # fathom-python
22
+
23
+ <!-- Start Summary [summary] -->
24
+ ## Summary
25
+
26
+ Fathom External API: The Fathom External API lets you poll meetings, teams, and team members, and
27
+ optionally receive webhooks when content from a new meeting is ready.
28
+ <!-- End Summary [summary] -->
29
+
30
+ <!-- Start Table of Contents [toc] -->
31
+ ## Table of Contents
32
+ <!-- $toc-max-depth=2 -->
33
+ * [fathom-python](#fathom-python)
34
+ * [SDK Installation](#sdk-installation)
35
+ * [IDE Support](#ide-support)
36
+ * [SDK Example Usage](#sdk-example-usage)
37
+ * [Authentication](#authentication)
38
+ * [Available Resources and Operations](#available-resources-and-operations)
39
+ * [Pagination](#pagination)
40
+ * [Retries](#retries)
41
+ * [Error Handling](#error-handling)
42
+ * [Server Selection](#server-selection)
43
+ * [Custom HTTP Client](#custom-http-client)
44
+ * [Resource Management](#resource-management)
45
+ * [Debugging](#debugging)
46
+ * [Development](#development)
47
+ * [Maturity](#maturity)
48
+
49
+ <!-- End Table of Contents [toc] -->
50
+
51
+ <!-- Start SDK Installation [installation] -->
52
+ ## SDK Installation
53
+
54
+ > [!NOTE]
55
+ > **Python version upgrade policy**
56
+ >
57
+ > Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
58
+
59
+ The SDK can be installed with either *pip* or *poetry* package managers.
60
+
61
+ ### PIP
62
+
63
+ *PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
64
+
65
+ ```bash
66
+ pip install fathom-python
67
+ ```
68
+
69
+ ### Poetry
70
+
71
+ *Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
72
+
73
+ ```bash
74
+ poetry add fathom-python
75
+ ```
76
+
77
+ ### Shell and script usage with `uv`
78
+
79
+ You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
80
+
81
+ ```shell
82
+ uvx --from fathom-python python
83
+ ```
84
+
85
+ It's also possible to write a standalone Python script without needing to set up a whole project like so:
86
+
87
+ ```python
88
+ #!/usr/bin/env -S uv run --script
89
+ # /// script
90
+ # requires-python = ">=3.9"
91
+ # dependencies = [
92
+ # "fathom-python",
93
+ # ]
94
+ # ///
95
+
96
+ from fathom_python import Fathom
97
+
98
+ sdk = Fathom(
99
+ # SDK arguments
100
+ )
101
+
102
+ # Rest of script here...
103
+ ```
104
+
105
+ Once that is saved to a file, you can run it with `uv run script.py` where
106
+ `script.py` can be replaced with the actual file name.
107
+ <!-- End SDK Installation [installation] -->
108
+
109
+ <!-- Start IDE Support [idesupport] -->
110
+ ## IDE Support
111
+
112
+ ### PyCharm
113
+
114
+ Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
115
+
116
+ - [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
117
+ <!-- End IDE Support [idesupport] -->
118
+
119
+ <!-- Start SDK Example Usage [usage] -->
120
+ ## SDK Example Usage
121
+
122
+ ### Example
123
+
124
+ ```python
125
+ # Synchronous Example
126
+ from fathom_python import Fathom, models
127
+ import os
128
+
129
+
130
+ with Fathom(
131
+ security=models.Security(
132
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
133
+ ),
134
+ ) as fathom:
135
+
136
+ res = fathom.list_meetings(calendar_invitees=[
137
+ "cfo@acme.com",
138
+ "legal@acme.com",
139
+ ], calendar_invitees_domains=[
140
+ "acme.com",
141
+ "client.com",
142
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
143
+ "ceo@acme.com",
144
+ "pm@acme.com",
145
+ ], teams=[
146
+ "Sales",
147
+ "Engineering",
148
+ ])
149
+
150
+ while res is not None:
151
+ # Handle items
152
+
153
+ res = res.next()
154
+ ```
155
+
156
+ </br>
157
+
158
+ The same SDK client can also be used to make asychronous requests by importing asyncio.
159
+ ```python
160
+ # Asynchronous Example
161
+ import asyncio
162
+ from fathom_python import Fathom, models
163
+ import os
164
+
165
+ async def main():
166
+
167
+ async with Fathom(
168
+ security=models.Security(
169
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
170
+ ),
171
+ ) as fathom:
172
+
173
+ res = await fathom.list_meetings_async(calendar_invitees=[
174
+ "cfo@acme.com",
175
+ "legal@acme.com",
176
+ ], calendar_invitees_domains=[
177
+ "acme.com",
178
+ "client.com",
179
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
180
+ "ceo@acme.com",
181
+ "pm@acme.com",
182
+ ], teams=[
183
+ "Sales",
184
+ "Engineering",
185
+ ])
186
+
187
+ while res is not None:
188
+ # Handle items
189
+
190
+ res = res.next()
191
+
192
+ asyncio.run(main())
193
+ ```
194
+ <!-- End SDK Example Usage [usage] -->
195
+
196
+ <!-- Start Authentication [security] -->
197
+ ## Authentication
198
+
199
+ ### Per-Client Security Schemes
200
+
201
+ This SDK supports the following security schemes globally:
202
+
203
+ | Name | Type | Scheme | Environment Variable |
204
+ | -------------------------- | ------ | ----------- | --------------------------------- |
205
+ | `api_key_auth` | apiKey | API key | `FATHOM_API_KEY_AUTH` |
206
+ | `bearer_auth` | http | HTTP Bearer | `FATHOM_BEARER_AUTH` |
207
+ | `token_request_standalone` | http | Custom HTTP | `FATHOM_TOKEN_REQUEST_STANDALONE` |
208
+
209
+ You can set the security parameters through the `security` optional parameter when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:
210
+ ```python
211
+ from fathom_python import Fathom, models
212
+ import os
213
+
214
+
215
+ with Fathom(
216
+ security=models.Security(
217
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
218
+ ),
219
+ ) as fathom:
220
+
221
+ res = fathom.list_meetings(calendar_invitees=[
222
+ "cfo@acme.com",
223
+ "legal@acme.com",
224
+ ], calendar_invitees_domains=[
225
+ "acme.com",
226
+ "client.com",
227
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
228
+ "ceo@acme.com",
229
+ "pm@acme.com",
230
+ ], teams=[
231
+ "Sales",
232
+ "Engineering",
233
+ ])
234
+
235
+ while res is not None:
236
+ # Handle items
237
+
238
+ res = res.next()
239
+
240
+ ```
241
+ <!-- End Authentication [security] -->
242
+
243
+ <!-- Start Available Resources and Operations [operations] -->
244
+ ## Available Resources and Operations
245
+
246
+ <details open>
247
+ <summary>Available methods</summary>
248
+
249
+ ### [Fathom SDK](docs/sdks/fathom/README.md)
250
+
251
+ * [list_meetings](docs/sdks/fathom/README.md#list_meetings) - List meetings
252
+ * [list_teams](docs/sdks/fathom/README.md#list_teams) - List teams
253
+ * [list_team_members](docs/sdks/fathom/README.md#list_team_members) - List team members
254
+ * [create_webhook](docs/sdks/fathom/README.md#create_webhook) - Create a webhook
255
+ * [delete_webhook](docs/sdks/fathom/README.md#delete_webhook) - Delete a webhook
256
+ * [get_token](docs/sdks/fathom/README.md#get_token) - Token endpoint for exchanging an authorization code or refreshing an access token
257
+
258
+ </details>
259
+ <!-- End Available Resources and Operations [operations] -->
260
+
261
+ <!-- Start Pagination [pagination] -->
262
+ ## Pagination
263
+
264
+ Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
265
+ returned response object will have a `Next` method that can be called to pull down the next group of results. If the
266
+ return value of `Next` is `None`, then there are no more pages to be fetched.
267
+
268
+ Here's an example of one such pagination call:
269
+ ```python
270
+ from fathom_python import Fathom, models
271
+ import os
272
+
273
+
274
+ with Fathom(
275
+ security=models.Security(
276
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
277
+ ),
278
+ ) as fathom:
279
+
280
+ res = fathom.list_meetings(calendar_invitees=[
281
+ "cfo@acme.com",
282
+ "legal@acme.com",
283
+ ], calendar_invitees_domains=[
284
+ "acme.com",
285
+ "client.com",
286
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
287
+ "ceo@acme.com",
288
+ "pm@acme.com",
289
+ ], teams=[
290
+ "Sales",
291
+ "Engineering",
292
+ ])
293
+
294
+ while res is not None:
295
+ # Handle items
296
+
297
+ res = res.next()
298
+
299
+ ```
300
+ <!-- End Pagination [pagination] -->
301
+
302
+ <!-- Start Retries [retries] -->
303
+ ## Retries
304
+
305
+ Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
306
+
307
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
308
+ ```python
309
+ from fathom_python import Fathom, models
310
+ from fathom_python.utils import BackoffStrategy, RetryConfig
311
+ import os
312
+
313
+
314
+ with Fathom(
315
+ security=models.Security(
316
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
317
+ ),
318
+ ) as fathom:
319
+
320
+ res = fathom.list_meetings(calendar_invitees=[
321
+ "cfo@acme.com",
322
+ "legal@acme.com",
323
+ ], calendar_invitees_domains=[
324
+ "acme.com",
325
+ "client.com",
326
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
327
+ "ceo@acme.com",
328
+ "pm@acme.com",
329
+ ], teams=[
330
+ "Sales",
331
+ "Engineering",
332
+ ],
333
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
334
+
335
+ while res is not None:
336
+ # Handle items
337
+
338
+ res = res.next()
339
+
340
+ ```
341
+
342
+ If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
343
+ ```python
344
+ from fathom_python import Fathom, models
345
+ from fathom_python.utils import BackoffStrategy, RetryConfig
346
+ import os
347
+
348
+
349
+ with Fathom(
350
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
351
+ security=models.Security(
352
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
353
+ ),
354
+ ) as fathom:
355
+
356
+ res = fathom.list_meetings(calendar_invitees=[
357
+ "cfo@acme.com",
358
+ "legal@acme.com",
359
+ ], calendar_invitees_domains=[
360
+ "acme.com",
361
+ "client.com",
362
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
363
+ "ceo@acme.com",
364
+ "pm@acme.com",
365
+ ], teams=[
366
+ "Sales",
367
+ "Engineering",
368
+ ])
369
+
370
+ while res is not None:
371
+ # Handle items
372
+
373
+ res = res.next()
374
+
375
+ ```
376
+ <!-- End Retries [retries] -->
377
+
378
+ <!-- Start Error Handling [errors] -->
379
+ ## Error Handling
380
+
381
+ [`FathomError`](./src/fathom_python/errors/fathomerror.py) is the base class for all HTTP error responses. It has the following properties:
382
+
383
+ | Property | Type | Description |
384
+ | ------------------ | ---------------- | ------------------------------------------------------ |
385
+ | `err.message` | `str` | Error message |
386
+ | `err.status_code` | `int` | HTTP response status code eg `404` |
387
+ | `err.headers` | `httpx.Headers` | HTTP response headers |
388
+ | `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
389
+ | `err.raw_response` | `httpx.Response` | Raw HTTP response |
390
+
391
+ ### Example
392
+ ```python
393
+ from fathom_python import Fathom, errors, models
394
+ import os
395
+
396
+
397
+ with Fathom(
398
+ security=models.Security(
399
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
400
+ ),
401
+ ) as fathom:
402
+ res = None
403
+ try:
404
+
405
+ res = fathom.list_meetings(calendar_invitees=[
406
+ "cfo@acme.com",
407
+ "legal@acme.com",
408
+ ], calendar_invitees_domains=[
409
+ "acme.com",
410
+ "client.com",
411
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
412
+ "ceo@acme.com",
413
+ "pm@acme.com",
414
+ ], teams=[
415
+ "Sales",
416
+ "Engineering",
417
+ ])
418
+
419
+ while res is not None:
420
+ # Handle items
421
+
422
+ res = res.next()
423
+
424
+
425
+ except errors.FathomError as e:
426
+ # The base class for HTTP error responses
427
+ print(e.message)
428
+ print(e.status_code)
429
+ print(e.body)
430
+ print(e.headers)
431
+ print(e.raw_response)
432
+
433
+ ```
434
+
435
+ ### Error Classes
436
+ **Primary error:**
437
+ * [`FathomError`](./src/fathom_python/errors/fathomerror.py): The base class for HTTP error responses.
438
+
439
+ <details><summary>Less common errors (5)</summary>
440
+
441
+ <br />
442
+
443
+ **Network errors:**
444
+ * [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
445
+ * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
446
+ * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
447
+
448
+
449
+ **Inherit from [`FathomError`](./src/fathom_python/errors/fathomerror.py)**:
450
+ * [`ResponseValidationError`](./src/fathom_python/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
451
+
452
+ </details>
453
+ <!-- End Error Handling [errors] -->
454
+
455
+
456
+ <!-- Start Server Selection [server] -->
457
+ ## Server Selection
458
+
459
+ ### Override Server URL Per-Client
460
+
461
+ The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
462
+ ```python
463
+ from fathom_python import Fathom, models
464
+ import os
465
+
466
+
467
+ with Fathom(
468
+ server_url="https://api.fathom.ai/external/v1",
469
+ security=models.Security(
470
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
471
+ ),
472
+ ) as fathom:
473
+
474
+ res = fathom.list_meetings(calendar_invitees=[
475
+ "cfo@acme.com",
476
+ "legal@acme.com",
477
+ ], calendar_invitees_domains=[
478
+ "acme.com",
479
+ "client.com",
480
+ ], include_crm_matches=False, include_transcript=False, meeting_type=models.ListMeetingsMeetingType.ALL, recorded_by=[
481
+ "ceo@acme.com",
482
+ "pm@acme.com",
483
+ ], teams=[
484
+ "Sales",
485
+ "Engineering",
486
+ ])
487
+
488
+ while res is not None:
489
+ # Handle items
490
+
491
+ res = res.next()
492
+
493
+ ```
494
+
495
+ ### Override Server URL Per-Operation
496
+
497
+ The server URL can also be overridden on a per-operation basis, provided a server list was specified for the operation. For example:
498
+ ```python
499
+ from fathom_python import Fathom, models
500
+ import os
501
+
502
+
503
+ with Fathom(
504
+ security=models.Security(
505
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
506
+ ),
507
+ ) as fathom:
508
+
509
+ res = fathom.get_token(grant_type=models.GetTokenGrantType.REFRESH_TOKEN, code="<value>", redirect_uri="https://aware-honesty.info", client_id="<id>", client_secret="<value>", server_url="https://fathom.video/external/v1")
510
+
511
+ # Handle response
512
+ print(res)
513
+
514
+ ```
515
+ <!-- End Server Selection [server] -->
516
+
517
+ <!-- Start Custom HTTP Client [http-client] -->
518
+ ## Custom HTTP Client
519
+
520
+ The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
521
+ Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
522
+ This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
523
+
524
+ For example, you could specify a header for every request that this sdk makes as follows:
525
+ ```python
526
+ from fathom_python import Fathom
527
+ import httpx
528
+
529
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
530
+ s = Fathom(client=http_client)
531
+ ```
532
+
533
+ or you could wrap the client with your own custom logic:
534
+ ```python
535
+ from fathom_python import Fathom
536
+ from fathom_python.httpclient import AsyncHttpClient
537
+ import httpx
538
+
539
+ class CustomClient(AsyncHttpClient):
540
+ client: AsyncHttpClient
541
+
542
+ def __init__(self, client: AsyncHttpClient):
543
+ self.client = client
544
+
545
+ async def send(
546
+ self,
547
+ request: httpx.Request,
548
+ *,
549
+ stream: bool = False,
550
+ auth: Union[
551
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
552
+ ] = httpx.USE_CLIENT_DEFAULT,
553
+ follow_redirects: Union[
554
+ bool, httpx._client.UseClientDefault
555
+ ] = httpx.USE_CLIENT_DEFAULT,
556
+ ) -> httpx.Response:
557
+ request.headers["Client-Level-Header"] = "added by client"
558
+
559
+ return await self.client.send(
560
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
561
+ )
562
+
563
+ def build_request(
564
+ self,
565
+ method: str,
566
+ url: httpx._types.URLTypes,
567
+ *,
568
+ content: Optional[httpx._types.RequestContent] = None,
569
+ data: Optional[httpx._types.RequestData] = None,
570
+ files: Optional[httpx._types.RequestFiles] = None,
571
+ json: Optional[Any] = None,
572
+ params: Optional[httpx._types.QueryParamTypes] = None,
573
+ headers: Optional[httpx._types.HeaderTypes] = None,
574
+ cookies: Optional[httpx._types.CookieTypes] = None,
575
+ timeout: Union[
576
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
577
+ ] = httpx.USE_CLIENT_DEFAULT,
578
+ extensions: Optional[httpx._types.RequestExtensions] = None,
579
+ ) -> httpx.Request:
580
+ return self.client.build_request(
581
+ method,
582
+ url,
583
+ content=content,
584
+ data=data,
585
+ files=files,
586
+ json=json,
587
+ params=params,
588
+ headers=headers,
589
+ cookies=cookies,
590
+ timeout=timeout,
591
+ extensions=extensions,
592
+ )
593
+
594
+ s = Fathom(async_client=CustomClient(httpx.AsyncClient()))
595
+ ```
596
+ <!-- End Custom HTTP Client [http-client] -->
597
+
598
+ <!-- Start Resource Management [resource-management] -->
599
+ ## Resource Management
600
+
601
+ The `Fathom` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
602
+
603
+ [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
604
+
605
+ ```python
606
+ from fathom_python import Fathom, models
607
+ import os
608
+ def main():
609
+
610
+ with Fathom(
611
+ security=models.Security(
612
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
613
+ ),
614
+ ) as fathom:
615
+ # Rest of application here...
616
+
617
+
618
+ # Or when using async:
619
+ async def amain():
620
+
621
+ async with Fathom(
622
+ security=models.Security(
623
+ api_key_auth=os.getenv("FATHOM_API_KEY_AUTH", ""),
624
+ ),
625
+ ) as fathom:
626
+ # Rest of application here...
627
+ ```
628
+ <!-- End Resource Management [resource-management] -->
629
+
630
+
631
+ <!-- Start Debugging [debug] -->
632
+ ## Debugging
633
+
634
+ You can setup your SDK to emit debug logs for SDK requests and responses.
635
+
636
+ You can pass your own logger class directly into your SDK.
637
+ ```python
638
+ from fathom_python import Fathom
639
+ import logging
640
+
641
+ logging.basicConfig(level=logging.DEBUG)
642
+ s = Fathom(debug_logger=logging.getLogger("fathom_python"))
643
+ ```
644
+
645
+ You can also enable a default debug logger by setting an environment variable `FATHOM_DEBUG` to true.
646
+ <!-- End Debugging [debug] -->
647
+
648
+ <!-- Placeholder for Future Speakeasy SDK Sections -->
649
+
650
+ # Development
651
+
652
+ ## Maturity
653
+
654
+ This SDK is in beta, and there may be breaking changes between versions without a major version update. Therefore, we recommend pinning usage
655
+ to a specific package version. This way, you can install the same version each time without breaking changes unless you are intentionally
656
+ looking for the latest version.
657
+