fathom-python 0.0.27__py3-none-any.whl → 0.0.28__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/__init__.py CHANGED
@@ -11,7 +11,6 @@ from .types import (
11
11
  CrmMatches,
12
12
  FathomUser,
13
13
  Invitee,
14
- ListMeetingsRequestMeetingType,
15
14
  Meeting,
16
15
  MeetingListResponse,
17
16
  MeetingMeetingType,
@@ -41,7 +40,6 @@ __all__ = [
41
40
  "CrmMatches",
42
41
  "FathomUser",
43
42
  "Invitee",
44
- "ListMeetingsRequestMeetingType",
45
43
  "Meeting",
46
44
  "MeetingListResponse",
47
45
  "MeetingMeetingType",
fathom/base_client.py CHANGED
@@ -4,14 +4,11 @@ import typing
4
4
 
5
5
  import httpx
6
6
  from .core.client_wrapper import AsyncClientWrapper, SyncClientWrapper
7
- from .core.pagination import AsyncPager, SyncPager
8
- from .core.request_options import RequestOptions
9
7
  from .environment import FathomApiEnvironment
10
- from .raw_base_client import AsyncRawBaseClient, RawBaseClient
11
- from .types.list_meetings_request_meeting_type import ListMeetingsRequestMeetingType
12
- from .types.meeting import Meeting
13
- from .types.team import Team
14
- from .types.team_member import TeamMember
8
+ from .meetings.client import AsyncMeetingsClient, MeetingsClient
9
+ from .team_members.client import AsyncTeamMembersClient, TeamMembersClient
10
+ from .teams.client import AsyncTeamsClient, TeamsClient
11
+ from .webhooks.client import AsyncWebhooksClient, WebhooksClient
15
12
 
16
13
 
17
14
  class BaseClient:
@@ -69,187 +66,10 @@ class BaseClient:
69
66
  else httpx.Client(timeout=_defaulted_timeout),
70
67
  timeout=_defaulted_timeout,
71
68
  )
72
- self._raw_client = RawBaseClient(client_wrapper=self._client_wrapper)
73
-
74
- @property
75
- def with_raw_response(self) -> RawBaseClient:
76
- """
77
- Retrieves a raw implementation of this client that returns raw responses.
78
-
79
- Returns
80
- -------
81
- RawBaseClient
82
- """
83
- return self._raw_client
84
-
85
- def list_meetings(
86
- self,
87
- *,
88
- recorded_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
89
- teams: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
90
- calendar_invitees: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
91
- created_before: typing.Optional[str] = None,
92
- created_after: typing.Optional[str] = None,
93
- calendar_invitees_domains: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
94
- meeting_type: typing.Optional[ListMeetingsRequestMeetingType] = None,
95
- include_transcript: typing.Optional[bool] = None,
96
- include_crm_matches: typing.Optional[bool] = None,
97
- cursor: typing.Optional[str] = None,
98
- request_options: typing.Optional[RequestOptions] = None,
99
- ) -> SyncPager[Meeting]:
100
- """
101
- Parameters
102
- ----------
103
- recorded_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]
104
- Email addresses of meeting owners.
105
-
106
- Pass the parameter once per value, e.g.
107
- `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`.
108
-
109
- Returns meetings hosted by any of the specified users.
110
-
111
- teams : typing.Optional[typing.Union[str, typing.Sequence[str]]]
112
- Team names to filter by.
113
-
114
- Pass the parameter once per value, e.g.
115
- `teams[]=Sales&teams[]=Engineering`.
116
-
117
- Returns meetings that belong to any of the specified teams.
118
-
119
- calendar_invitees : typing.Optional[typing.Union[str, typing.Sequence[str]]]
120
- Email address of calendar_invitees to filter by.
121
-
122
- Pass the parameter once per value, e.g.
123
- `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`.
124
-
125
- Returns meetings where any of the given email addresses appear
126
- in the calendar_invitees list.
127
-
128
- created_before : typing.Optional[str]
129
- Filter to meetings with created_at before this timestamp, e.g. `created_before=2025-01-01T00:00:00Z`.
130
-
131
- created_after : typing.Optional[str]
132
- Filter to meetings with created_at after this timestamp, e.g. `created_after=2025-01-01T00:00:00Z`.
133
-
134
- calendar_invitees_domains : typing.Optional[typing.Union[str, typing.Sequence[str]]]
135
- Domains of the companies to filter by. Exact match.
136
-
137
- Pass the parameter once per value, e.g.
138
- `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`.
139
-
140
- Returns meetings where any of the given company domains appear in the meeting.
141
-
142
- meeting_type : typing.Optional[ListMeetingsRequestMeetingType]
143
- Filter by meeting type.
144
-
145
- include_transcript : typing.Optional[bool]
146
- Include the transcript for each meeting.
147
-
148
- include_crm_matches : typing.Optional[bool]
149
- Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
150
-
151
- cursor : typing.Optional[str]
152
- Cursor for pagination.
153
-
154
- request_options : typing.Optional[RequestOptions]
155
- Request-specific configuration.
156
-
157
- Returns
158
- -------
159
- SyncPager[Meeting]
160
- Paginated list of meetings.
161
-
162
- Examples
163
- --------
164
- from fathom import FathomApi
165
- client = FathomApi(api_key="YOUR_API_KEY", )
166
- response = client.list_meetings()
167
- for item in response:
168
- yield item
169
- # alternatively, you can paginate page-by-page
170
- for page in response.iter_pages():
171
- yield page
172
- """
173
- return self._raw_client.list_meetings(
174
- recorded_by=recorded_by,
175
- teams=teams,
176
- calendar_invitees=calendar_invitees,
177
- created_before=created_before,
178
- created_after=created_after,
179
- calendar_invitees_domains=calendar_invitees_domains,
180
- meeting_type=meeting_type,
181
- include_transcript=include_transcript,
182
- include_crm_matches=include_crm_matches,
183
- cursor=cursor,
184
- request_options=request_options,
185
- )
186
-
187
- def list_teams(
188
- self, *, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
189
- ) -> SyncPager[Team]:
190
- """
191
- Parameters
192
- ----------
193
- cursor : typing.Optional[str]
194
- Cursor for pagination.
195
-
196
- request_options : typing.Optional[RequestOptions]
197
- Request-specific configuration.
198
-
199
- Returns
200
- -------
201
- SyncPager[Team]
202
- Paginated list of teams.
203
-
204
- Examples
205
- --------
206
- from fathom import FathomApi
207
- client = FathomApi(api_key="YOUR_API_KEY", )
208
- response = client.list_teams()
209
- for item in response:
210
- yield item
211
- # alternatively, you can paginate page-by-page
212
- for page in response.iter_pages():
213
- yield page
214
- """
215
- return self._raw_client.list_teams(cursor=cursor, request_options=request_options)
216
-
217
- def list_team_members(
218
- self,
219
- *,
220
- team: typing.Optional[str] = None,
221
- cursor: typing.Optional[str] = None,
222
- request_options: typing.Optional[RequestOptions] = None,
223
- ) -> SyncPager[TeamMember]:
224
- """
225
- Parameters
226
- ----------
227
- team : typing.Optional[str]
228
- Team name to filter by.
229
-
230
- cursor : typing.Optional[str]
231
- Cursor for pagination.
232
-
233
- request_options : typing.Optional[RequestOptions]
234
- Request-specific configuration.
235
-
236
- Returns
237
- -------
238
- SyncPager[TeamMember]
239
- Paginated list of team members.
240
-
241
- Examples
242
- --------
243
- from fathom import FathomApi
244
- client = FathomApi(api_key="YOUR_API_KEY", )
245
- response = client.list_team_members()
246
- for item in response:
247
- yield item
248
- # alternatively, you can paginate page-by-page
249
- for page in response.iter_pages():
250
- yield page
251
- """
252
- return self._raw_client.list_team_members(team=team, cursor=cursor, request_options=request_options)
69
+ self.meetings = MeetingsClient(client_wrapper=self._client_wrapper)
70
+ self.teams = TeamsClient(client_wrapper=self._client_wrapper)
71
+ self.team_members = TeamMembersClient(client_wrapper=self._client_wrapper)
72
+ self.webhooks = WebhooksClient(client_wrapper=self._client_wrapper)
253
73
 
254
74
 
255
75
  class AsyncBaseClient:
@@ -307,199 +127,10 @@ class AsyncBaseClient:
307
127
  else httpx.AsyncClient(timeout=_defaulted_timeout),
308
128
  timeout=_defaulted_timeout,
309
129
  )
310
- self._raw_client = AsyncRawBaseClient(client_wrapper=self._client_wrapper)
311
-
312
- @property
313
- def with_raw_response(self) -> AsyncRawBaseClient:
314
- """
315
- Retrieves a raw implementation of this client that returns raw responses.
316
-
317
- Returns
318
- -------
319
- AsyncRawBaseClient
320
- """
321
- return self._raw_client
322
-
323
- async def list_meetings(
324
- self,
325
- *,
326
- recorded_by: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
327
- teams: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
328
- calendar_invitees: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
329
- created_before: typing.Optional[str] = None,
330
- created_after: typing.Optional[str] = None,
331
- calendar_invitees_domains: typing.Optional[typing.Union[str, typing.Sequence[str]]] = None,
332
- meeting_type: typing.Optional[ListMeetingsRequestMeetingType] = None,
333
- include_transcript: typing.Optional[bool] = None,
334
- include_crm_matches: typing.Optional[bool] = None,
335
- cursor: typing.Optional[str] = None,
336
- request_options: typing.Optional[RequestOptions] = None,
337
- ) -> AsyncPager[Meeting]:
338
- """
339
- Parameters
340
- ----------
341
- recorded_by : typing.Optional[typing.Union[str, typing.Sequence[str]]]
342
- Email addresses of meeting owners.
343
-
344
- Pass the parameter once per value, e.g.
345
- `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`.
346
-
347
- Returns meetings hosted by any of the specified users.
348
-
349
- teams : typing.Optional[typing.Union[str, typing.Sequence[str]]]
350
- Team names to filter by.
351
-
352
- Pass the parameter once per value, e.g.
353
- `teams[]=Sales&teams[]=Engineering`.
354
-
355
- Returns meetings that belong to any of the specified teams.
356
-
357
- calendar_invitees : typing.Optional[typing.Union[str, typing.Sequence[str]]]
358
- Email address of calendar_invitees to filter by.
359
-
360
- Pass the parameter once per value, e.g.
361
- `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`.
362
-
363
- Returns meetings where any of the given email addresses appear
364
- in the calendar_invitees list.
365
-
366
- created_before : typing.Optional[str]
367
- Filter to meetings with created_at before this timestamp, e.g. `created_before=2025-01-01T00:00:00Z`.
368
-
369
- created_after : typing.Optional[str]
370
- Filter to meetings with created_at after this timestamp, e.g. `created_after=2025-01-01T00:00:00Z`.
371
-
372
- calendar_invitees_domains : typing.Optional[typing.Union[str, typing.Sequence[str]]]
373
- Domains of the companies to filter by. Exact match.
374
-
375
- Pass the parameter once per value, e.g.
376
- `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`.
377
-
378
- Returns meetings where any of the given company domains appear in the meeting.
379
-
380
- meeting_type : typing.Optional[ListMeetingsRequestMeetingType]
381
- Filter by meeting type.
382
-
383
- include_transcript : typing.Optional[bool]
384
- Include the transcript for each meeting.
385
-
386
- include_crm_matches : typing.Optional[bool]
387
- Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
388
-
389
- cursor : typing.Optional[str]
390
- Cursor for pagination.
391
-
392
- request_options : typing.Optional[RequestOptions]
393
- Request-specific configuration.
394
-
395
- Returns
396
- -------
397
- AsyncPager[Meeting]
398
- Paginated list of meetings.
399
-
400
- Examples
401
- --------
402
- from fathom import AsyncFathomApi
403
- import asyncio
404
- client = AsyncFathomApi(api_key="YOUR_API_KEY", )
405
- async def main() -> None:
406
- response = await client.list_meetings()
407
- async for item in response:
408
- yield item
409
-
410
- # alternatively, you can paginate page-by-page
411
- async for page in response.iter_pages():
412
- yield page
413
- asyncio.run(main())
414
- """
415
- return await self._raw_client.list_meetings(
416
- recorded_by=recorded_by,
417
- teams=teams,
418
- calendar_invitees=calendar_invitees,
419
- created_before=created_before,
420
- created_after=created_after,
421
- calendar_invitees_domains=calendar_invitees_domains,
422
- meeting_type=meeting_type,
423
- include_transcript=include_transcript,
424
- include_crm_matches=include_crm_matches,
425
- cursor=cursor,
426
- request_options=request_options,
427
- )
428
-
429
- async def list_teams(
430
- self, *, cursor: typing.Optional[str] = None, request_options: typing.Optional[RequestOptions] = None
431
- ) -> AsyncPager[Team]:
432
- """
433
- Parameters
434
- ----------
435
- cursor : typing.Optional[str]
436
- Cursor for pagination.
437
-
438
- request_options : typing.Optional[RequestOptions]
439
- Request-specific configuration.
440
-
441
- Returns
442
- -------
443
- AsyncPager[Team]
444
- Paginated list of teams.
445
-
446
- Examples
447
- --------
448
- from fathom import AsyncFathomApi
449
- import asyncio
450
- client = AsyncFathomApi(api_key="YOUR_API_KEY", )
451
- async def main() -> None:
452
- response = await client.list_teams()
453
- async for item in response:
454
- yield item
455
-
456
- # alternatively, you can paginate page-by-page
457
- async for page in response.iter_pages():
458
- yield page
459
- asyncio.run(main())
460
- """
461
- return await self._raw_client.list_teams(cursor=cursor, request_options=request_options)
462
-
463
- async def list_team_members(
464
- self,
465
- *,
466
- team: typing.Optional[str] = None,
467
- cursor: typing.Optional[str] = None,
468
- request_options: typing.Optional[RequestOptions] = None,
469
- ) -> AsyncPager[TeamMember]:
470
- """
471
- Parameters
472
- ----------
473
- team : typing.Optional[str]
474
- Team name to filter by.
475
-
476
- cursor : typing.Optional[str]
477
- Cursor for pagination.
478
-
479
- request_options : typing.Optional[RequestOptions]
480
- Request-specific configuration.
481
-
482
- Returns
483
- -------
484
- AsyncPager[TeamMember]
485
- Paginated list of team members.
486
-
487
- Examples
488
- --------
489
- from fathom import AsyncFathomApi
490
- import asyncio
491
- client = AsyncFathomApi(api_key="YOUR_API_KEY", )
492
- async def main() -> None:
493
- response = await client.list_team_members()
494
- async for item in response:
495
- yield item
496
-
497
- # alternatively, you can paginate page-by-page
498
- async for page in response.iter_pages():
499
- yield page
500
- asyncio.run(main())
501
- """
502
- return await self._raw_client.list_team_members(team=team, cursor=cursor, request_options=request_options)
130
+ self.meetings = AsyncMeetingsClient(client_wrapper=self._client_wrapper)
131
+ self.teams = AsyncTeamsClient(client_wrapper=self._client_wrapper)
132
+ self.team_members = AsyncTeamMembersClient(client_wrapper=self._client_wrapper)
133
+ self.webhooks = AsyncWebhooksClient(client_wrapper=self._client_wrapper)
503
134
 
504
135
 
505
136
  def _get_base_url(*, base_url: typing.Optional[str] = None, environment: FathomApiEnvironment) -> str:
@@ -14,10 +14,10 @@ class BaseClientWrapper:
14
14
 
15
15
  def get_headers(self) -> typing.Dict[str, str]:
16
16
  headers: typing.Dict[str, str] = {
17
- "User-Agent": "fathom-python/0.0.27",
17
+ "User-Agent": "fathom-python/0.0.28",
18
18
  "X-Fern-Language": "Python",
19
19
  "X-Fern-SDK-Name": "fathom-python",
20
- "X-Fern-SDK-Version": "0.0.27",
20
+ "X-Fern-SDK-Version": "0.0.28",
21
21
  }
22
22
  headers["X-Api-Key"] = self.api_key
23
23
  return headers
fathom/errors/__init__.py CHANGED
@@ -3,6 +3,8 @@
3
3
  # isort: skip_file
4
4
 
5
5
  from .bad_request_error import BadRequestError
6
+ from .not_found_error import NotFoundError
7
+ from .too_many_requests_error import TooManyRequestsError
6
8
  from .unauthorized_error import UnauthorizedError
7
9
 
8
- __all__ = ["BadRequestError", "UnauthorizedError"]
10
+ __all__ = ["BadRequestError", "NotFoundError", "TooManyRequestsError", "UnauthorizedError"]
@@ -0,0 +1,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.api_error import ApiError
6
+
7
+
8
+ class NotFoundError(ApiError):
9
+ def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
10
+ super().__init__(status_code=404, headers=headers, body=body)
@@ -0,0 +1,10 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ import typing
4
+
5
+ from ..core.api_error import ApiError
6
+
7
+
8
+ class TooManyRequestsError(ApiError):
9
+ def __init__(self, body: typing.Optional[typing.Any], headers: typing.Optional[typing.Dict[str, str]] = None):
10
+ super().__init__(status_code=429, headers=headers, body=body)
@@ -0,0 +1,7 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+
5
+ from .types import ListMeetingsRequestMeetingType
6
+
7
+ __all__ = ["ListMeetingsRequestMeetingType"]