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