fathom-python 0.0.35__py3-none-any.whl → 0.0.37__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 CHANGED
@@ -3,10 +3,10 @@
3
3
  import importlib.metadata
4
4
 
5
5
  __title__: str = "fathom-python"
6
- __version__: str = "0.0.35"
6
+ __version__: str = "0.0.37"
7
7
  __openapi_doc_version__: str = "1.0.0"
8
- __gen_version__: str = "2.716.16"
9
- __user_agent__: str = "speakeasy-sdk/python 0.0.35 2.716.16 1.0.0 fathom-python"
8
+ __gen_version__: str = "2.762.0"
9
+ __user_agent__: str = "speakeasy-sdk/python 0.0.37 2.762.0 1.0.0 fathom-python"
10
10
 
11
11
  try:
12
12
  if __package__ is not None:
@@ -9,7 +9,7 @@ from fathom_python.errors import FathomError
9
9
  MAX_MESSAGE_LEN = 10_000
10
10
 
11
11
 
12
- @dataclass(frozen=True)
12
+ @dataclass(unsafe_hash=True)
13
13
  class APIError(FathomError):
14
14
  """The fallback error class if no more specific error class is matched."""
15
15
 
@@ -5,7 +5,7 @@ from typing import Optional
5
5
  from dataclasses import dataclass, field
6
6
 
7
7
 
8
- @dataclass(frozen=True)
8
+ @dataclass(unsafe_hash=True)
9
9
  class FathomError(Exception):
10
10
  """The base class for all HTTP error responses."""
11
11
 
@@ -3,7 +3,7 @@
3
3
  from dataclasses import dataclass
4
4
 
5
5
 
6
- @dataclass(frozen=True)
6
+ @dataclass(unsafe_hash=True)
7
7
  class NoResponseError(Exception):
8
8
  """Error raised when no HTTP response is received from the server."""
9
9
 
@@ -7,7 +7,7 @@ from dataclasses import dataclass
7
7
  from fathom_python.errors import FathomError
8
8
 
9
9
 
10
- @dataclass(frozen=True)
10
+ @dataclass(unsafe_hash=True)
11
11
  class ResponseValidationError(FathomError):
12
12
  """Error raised when there is a type mismatch between the response data and the expected Pydantic model."""
13
13
 
@@ -107,7 +107,6 @@ def close_clients(
107
107
  # to them from the owning SDK instance and they can be reaped.
108
108
  owner.client = None
109
109
  owner.async_client = None
110
-
111
110
  if sync_client is not None and not sync_client_supplied:
112
111
  try:
113
112
  sync_client.close()
@@ -27,16 +27,6 @@ class MeetingType(str, Enum):
27
27
 
28
28
 
29
29
  class ListMeetingsRequestTypedDict(TypedDict):
30
- calendar_invitees: NotRequired[List[str]]
31
- r"""Email address of calendar_invitees to filter by.
32
-
33
- Pass the parameter once per value, e.g.
34
- `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`.
35
-
36
- Returns meetings where any of the given email addresses appear
37
- in the calendar_invitees list.
38
-
39
- """
40
30
  calendar_invitees_domains: NotRequired[List[str]]
41
31
  r"""Domains of the companies to filter by. Exact match.
42
32
 
@@ -85,21 +75,6 @@ class ListMeetingsRequestTypedDict(TypedDict):
85
75
 
86
76
 
87
77
  class ListMeetingsRequest(BaseModel):
88
- calendar_invitees: Annotated[
89
- Optional[List[str]],
90
- pydantic.Field(alias="calendar_invitees[]"),
91
- FieldMetadata(query=QueryParamMetadata(style="form", explode=True)),
92
- ] = None
93
- r"""Email address of calendar_invitees to filter by.
94
-
95
- Pass the parameter once per value, e.g.
96
- `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`.
97
-
98
- Returns meetings where any of the given email addresses appear
99
- in the calendar_invitees list.
100
-
101
- """
102
-
103
78
  calendar_invitees_domains: Annotated[
104
79
  Optional[List[str]],
105
80
  pydantic.Field(alias="calendar_invitees_domains[]"),
@@ -28,7 +28,7 @@ class CalendarInviteesDomainsType(str, Enum):
28
28
 
29
29
  class MeetingTypedDict(TypedDict):
30
30
  title: str
31
- meeting_title: str
31
+ meeting_title: Nullable[str]
32
32
  r"""Calendar event title."""
33
33
  recording_id: int
34
34
  r"""The ID of the meeting recording."""
@@ -56,7 +56,7 @@ class MeetingTypedDict(TypedDict):
56
56
  class Meeting(BaseModel):
57
57
  title: str
58
58
 
59
- meeting_title: str
59
+ meeting_title: Nullable[str]
60
60
  r"""Calendar event title."""
61
61
 
62
62
  recording_id: int
@@ -105,6 +105,7 @@ class Meeting(BaseModel):
105
105
  "crm_matches",
106
106
  ]
107
107
  nullable_fields = [
108
+ "meeting_title",
108
109
  "transcript",
109
110
  "default_summary",
110
111
  "action_items",
@@ -1,14 +1,20 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
3
  from __future__ import annotations
4
- from fathom_python.types import BaseModel
5
- from typing import Optional
4
+ from fathom_python.types import (
5
+ BaseModel,
6
+ Nullable,
7
+ OptionalNullable,
8
+ UNSET,
9
+ UNSET_SENTINEL,
10
+ )
11
+ from pydantic import model_serializer
6
12
  from typing_extensions import NotRequired, TypedDict
7
13
 
8
14
 
9
15
  class TranscriptItemSpeakerTypedDict(TypedDict):
10
16
  display_name: str
11
- matched_calendar_invitee_email: NotRequired[str]
17
+ matched_calendar_invitee_email: NotRequired[Nullable[str]]
12
18
  r"""**Coming soon!**
13
19
 
14
20
  """
@@ -17,7 +23,37 @@ class TranscriptItemSpeakerTypedDict(TypedDict):
17
23
  class TranscriptItemSpeaker(BaseModel):
18
24
  display_name: str
19
25
 
20
- matched_calendar_invitee_email: Optional[str] = None
26
+ matched_calendar_invitee_email: OptionalNullable[str] = UNSET
21
27
  r"""**Coming soon!**
22
28
 
23
29
  """
30
+
31
+ @model_serializer(mode="wrap")
32
+ def serialize_model(self, handler):
33
+ optional_fields = ["matched_calendar_invitee_email"]
34
+ nullable_fields = ["matched_calendar_invitee_email"]
35
+ null_default_fields = []
36
+
37
+ serialized = handler(self)
38
+
39
+ m = {}
40
+
41
+ for n, f in type(self).model_fields.items():
42
+ k = f.alias or n
43
+ val = serialized.get(k)
44
+ serialized.pop(k, None)
45
+
46
+ optional_nullable = k in optional_fields and k in nullable_fields
47
+ is_set = (
48
+ self.__pydantic_fields_set__.intersection({n})
49
+ or k in null_default_fields
50
+ ) # pylint: disable=no-member
51
+
52
+ if val is not None and val != UNSET_SENTINEL:
53
+ m[k] = val
54
+ elif val != UNSET_SENTINEL and (
55
+ not k in optional_fields or (optional_nullable and is_set)
56
+ ):
57
+ m[k] = val
58
+
59
+ return m
fathom_python/sdk.py CHANGED
@@ -266,7 +266,6 @@ class Fathom(BaseSDK):
266
266
  def list_meetings(
267
267
  self,
268
268
  *,
269
- calendar_invitees: Optional[List[str]] = None,
270
269
  calendar_invitees_domains: Optional[List[str]] = None,
271
270
  calendar_invitees_domains_type: Optional[
272
271
  models.ListMeetingsCalendarInviteesDomainsType
@@ -288,8 +287,13 @@ class Fathom(BaseSDK):
288
287
  ) -> Optional[models.ListMeetingsResponse]:
289
288
  r"""List meetings
290
289
 
291
- :param calendar_invitees: Email address of calendar_invitees to filter by. Pass the parameter once per value, e.g. `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`. Returns meetings where any of the given email addresses appear in the calendar_invitees list.
292
- :param calendar_invitees_domains: Domains of the companies to filter by. Exact match. Pass the parameter once per value, e.g. `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`. Returns meetings where any of the given company domains appear in the meeting.
290
+ :param calendar_invitees_domains: Domains of the companies to filter by. Exact match.
291
+
292
+ Pass the parameter once per value, e.g.
293
+ `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`.
294
+
295
+ Returns meetings where any of the given company domains appear in the meeting.
296
+
293
297
  :param calendar_invitees_domains_type: Filter by whether calendar invitee list includes external email domains.
294
298
  :param created_after: Filter to meetings with created_at after this timestamp, e.g. `created_after=2025-01-01T00:00:00Z`.
295
299
  :param created_before: Filter to meetings with created_at before this timestamp, e.g. `created_before=2025-01-01T00:00:00Z`.
@@ -299,8 +303,20 @@ class Fathom(BaseSDK):
299
303
  :param include_summary: Include the summary for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
300
304
  :param include_transcript: Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
301
305
  :param meeting_type: Filter by meeting type.
302
- :param recorded_by: Email addresses of users who recorded meetings. Pass the parameter once per value, e.g. `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`. Returns meetings recorded by any of the specified users.
303
- :param teams: Team names to filter by. Pass the parameter once per value, e.g. `teams[]=Sales&teams[]=Engineering`. Returns meetings that belong to any of the specified teams.
306
+ :param recorded_by: Email addresses of users who recorded meetings.
307
+
308
+ Pass the parameter once per value, e.g.
309
+ `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`.
310
+
311
+ Returns meetings recorded by any of the specified users.
312
+
313
+ :param teams: Team names to filter by.
314
+
315
+ Pass the parameter once per value, e.g.
316
+ `teams[]=Sales&teams[]=Engineering`.
317
+
318
+ Returns meetings that belong to any of the specified teams.
319
+
304
320
  :param retries: Override the default retry configuration for this method
305
321
  :param server_url: Override the default server URL for this method
306
322
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -317,7 +333,6 @@ class Fathom(BaseSDK):
317
333
  base_url = self._get_url(base_url, url_variables)
318
334
 
319
335
  request = models.ListMeetingsRequest(
320
- calendar_invitees=calendar_invitees,
321
336
  calendar_invitees_domains=calendar_invitees_domains,
322
337
  calendar_invitees_domains_type=calendar_invitees_domains_type,
323
338
  created_after=created_after,
@@ -361,7 +376,7 @@ class Fathom(BaseSDK):
361
376
  config=self.sdk_configuration,
362
377
  base_url=base_url or "",
363
378
  operation_id="listMeetings",
364
- oauth2_scopes=[],
379
+ oauth2_scopes=None,
365
380
  security_source=get_security_from_env(
366
381
  self.sdk_configuration.security, models.Security
367
382
  ),
@@ -383,7 +398,6 @@ class Fathom(BaseSDK):
383
398
  return None
384
399
 
385
400
  return self.list_meetings(
386
- calendar_invitees=calendar_invitees,
387
401
  calendar_invitees_domains=calendar_invitees_domains,
388
402
  calendar_invitees_domains_type=calendar_invitees_domains_type,
389
403
  created_after=created_after,
@@ -416,7 +430,6 @@ class Fathom(BaseSDK):
416
430
  async def list_meetings_async(
417
431
  self,
418
432
  *,
419
- calendar_invitees: Optional[List[str]] = None,
420
433
  calendar_invitees_domains: Optional[List[str]] = None,
421
434
  calendar_invitees_domains_type: Optional[
422
435
  models.ListMeetingsCalendarInviteesDomainsType
@@ -438,8 +451,13 @@ class Fathom(BaseSDK):
438
451
  ) -> Optional[models.ListMeetingsResponse]:
439
452
  r"""List meetings
440
453
 
441
- :param calendar_invitees: Email address of calendar_invitees to filter by. Pass the parameter once per value, e.g. `calendar_invitees[]=cfo@acme.com&calendar_invitees[]=legal@acme.com`. Returns meetings where any of the given email addresses appear in the calendar_invitees list.
442
- :param calendar_invitees_domains: Domains of the companies to filter by. Exact match. Pass the parameter once per value, e.g. `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`. Returns meetings where any of the given company domains appear in the meeting.
454
+ :param calendar_invitees_domains: Domains of the companies to filter by. Exact match.
455
+
456
+ Pass the parameter once per value, e.g.
457
+ `calendar_invitees_domains[]=acme.com&calendar_invitees_domains[]=client.com`.
458
+
459
+ Returns meetings where any of the given company domains appear in the meeting.
460
+
443
461
  :param calendar_invitees_domains_type: Filter by whether calendar invitee list includes external email domains.
444
462
  :param created_after: Filter to meetings with created_at after this timestamp, e.g. `created_after=2025-01-01T00:00:00Z`.
445
463
  :param created_before: Filter to meetings with created_at before this timestamp, e.g. `created_before=2025-01-01T00:00:00Z`.
@@ -449,8 +467,20 @@ class Fathom(BaseSDK):
449
467
  :param include_summary: Include the summary for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
450
468
  :param include_transcript: Include the transcript for each meeting. Unavailable for OAuth connected apps (use /recordings instead).
451
469
  :param meeting_type: Filter by meeting type.
452
- :param recorded_by: Email addresses of users who recorded meetings. Pass the parameter once per value, e.g. `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`. Returns meetings recorded by any of the specified users.
453
- :param teams: Team names to filter by. Pass the parameter once per value, e.g. `teams[]=Sales&teams[]=Engineering`. Returns meetings that belong to any of the specified teams.
470
+ :param recorded_by: Email addresses of users who recorded meetings.
471
+
472
+ Pass the parameter once per value, e.g.
473
+ `recorded_by[]=ceo@acme.com&recorded_by[]=pm@acme.com`.
474
+
475
+ Returns meetings recorded by any of the specified users.
476
+
477
+ :param teams: Team names to filter by.
478
+
479
+ Pass the parameter once per value, e.g.
480
+ `teams[]=Sales&teams[]=Engineering`.
481
+
482
+ Returns meetings that belong to any of the specified teams.
483
+
454
484
  :param retries: Override the default retry configuration for this method
455
485
  :param server_url: Override the default server URL for this method
456
486
  :param timeout_ms: Override the default request timeout configuration for this method in milliseconds
@@ -467,7 +497,6 @@ class Fathom(BaseSDK):
467
497
  base_url = self._get_url(base_url, url_variables)
468
498
 
469
499
  request = models.ListMeetingsRequest(
470
- calendar_invitees=calendar_invitees,
471
500
  calendar_invitees_domains=calendar_invitees_domains,
472
501
  calendar_invitees_domains_type=calendar_invitees_domains_type,
473
502
  created_after=created_after,
@@ -511,7 +540,7 @@ class Fathom(BaseSDK):
511
540
  config=self.sdk_configuration,
512
541
  base_url=base_url or "",
513
542
  operation_id="listMeetings",
514
- oauth2_scopes=[],
543
+ oauth2_scopes=None,
515
544
  security_source=get_security_from_env(
516
545
  self.sdk_configuration.security, models.Security
517
546
  ),
@@ -533,7 +562,6 @@ class Fathom(BaseSDK):
533
562
  return None
534
563
 
535
564
  return self.list_meetings(
536
- calendar_invitees=calendar_invitees,
537
565
  calendar_invitees_domains=calendar_invitees_domains,
538
566
  calendar_invitees_domains_type=calendar_invitees_domains_type,
539
567
  created_after=created_after,
@@ -631,7 +659,7 @@ class Fathom(BaseSDK):
631
659
  config=self.sdk_configuration,
632
660
  base_url=base_url or "",
633
661
  operation_id="getRecordingSummary",
634
- oauth2_scopes=[],
662
+ oauth2_scopes=None,
635
663
  security_source=get_security_from_env(
636
664
  self.sdk_configuration.security, models.Security
637
665
  ),
@@ -720,7 +748,7 @@ class Fathom(BaseSDK):
720
748
  config=self.sdk_configuration,
721
749
  base_url=base_url or "",
722
750
  operation_id="getRecordingSummary",
723
- oauth2_scopes=[],
751
+ oauth2_scopes=None,
724
752
  security_source=get_security_from_env(
725
753
  self.sdk_configuration.security, models.Security
726
754
  ),
@@ -809,7 +837,7 @@ class Fathom(BaseSDK):
809
837
  config=self.sdk_configuration,
810
838
  base_url=base_url or "",
811
839
  operation_id="getRecordingTranscript",
812
- oauth2_scopes=[],
840
+ oauth2_scopes=None,
813
841
  security_source=get_security_from_env(
814
842
  self.sdk_configuration.security, models.Security
815
843
  ),
@@ -900,7 +928,7 @@ class Fathom(BaseSDK):
900
928
  config=self.sdk_configuration,
901
929
  base_url=base_url or "",
902
930
  operation_id="getRecordingTranscript",
903
- oauth2_scopes=[],
931
+ oauth2_scopes=None,
904
932
  security_source=get_security_from_env(
905
933
  self.sdk_configuration.security, models.Security
906
934
  ),
@@ -983,7 +1011,7 @@ class Fathom(BaseSDK):
983
1011
  config=self.sdk_configuration,
984
1012
  base_url=base_url or "",
985
1013
  operation_id="listTeams",
986
- oauth2_scopes=[],
1014
+ oauth2_scopes=None,
987
1015
  security_source=get_security_from_env(
988
1016
  self.sdk_configuration.security, models.Security
989
1017
  ),
@@ -1083,7 +1111,7 @@ class Fathom(BaseSDK):
1083
1111
  config=self.sdk_configuration,
1084
1112
  base_url=base_url or "",
1085
1113
  operation_id="listTeams",
1086
- oauth2_scopes=[],
1114
+ oauth2_scopes=None,
1087
1115
  security_source=get_security_from_env(
1088
1116
  self.sdk_configuration.security, models.Security
1089
1117
  ),
@@ -1186,7 +1214,7 @@ class Fathom(BaseSDK):
1186
1214
  config=self.sdk_configuration,
1187
1215
  base_url=base_url or "",
1188
1216
  operation_id="listTeamMembers",
1189
- oauth2_scopes=[],
1217
+ oauth2_scopes=None,
1190
1218
  security_source=get_security_from_env(
1191
1219
  self.sdk_configuration.security, models.Security
1192
1220
  ),
@@ -1290,7 +1318,7 @@ class Fathom(BaseSDK):
1290
1318
  config=self.sdk_configuration,
1291
1319
  base_url=base_url or "",
1292
1320
  operation_id="listTeamMembers",
1293
- oauth2_scopes=[],
1321
+ oauth2_scopes=None,
1294
1322
  security_source=get_security_from_env(
1295
1323
  self.sdk_configuration.security, models.Security
1296
1324
  ),
@@ -1352,7 +1380,12 @@ class Fathom(BaseSDK):
1352
1380
 
1353
1381
 
1354
1382
  :param destination_url: The URL to send the webhook to.
1355
- :param triggered_for: You must send at least one of the following types of recordings to trigger on. - `my_recordings`: Your private recordings, as well as those you've shared with individuals. (On Team Plans, this excludes recordings you've shared with any teams.) - `shared_external_recordings`: Recordings shared with you by other users. (For Team Plans, this does not include recordings shared by other users on your Team Plan.) - `my_shared_with_team_recordings`: (Team Plans only). All recordings that you have shared with other teams (e.g. Marketing or Sales). Recordings you've shared with individuals but not with teams are not included. - `shared_team_recordings`: (Team Plans only) All recordings you can access from other users on your Team Plan, whether shared with you individually or with your team.
1383
+ :param triggered_for: You must send at least one of the following types of recordings to trigger on.
1384
+ - `my_recordings`: Your private recordings, as well as those you've shared with individuals. (On Team Plans, this excludes recordings you've shared with any teams.)
1385
+ - `shared_external_recordings`: Recordings shared with you by other users. (For Team Plans, this does not include recordings shared by other users on your Team Plan.)
1386
+ - `my_shared_with_team_recordings`: (Team Plans only). All recordings that you have shared with other teams (e.g. Marketing or Sales). Recordings you've shared with individuals but not with teams are not included.
1387
+ - `shared_team_recordings`: (Team Plans only) All recordings you can access from other users on your Team Plan, whether shared with you individually or with your team.
1388
+
1356
1389
  :param include_action_items: Include the action items for each meeting.
1357
1390
  :param include_crm_matches: Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
1358
1391
  :param include_summary: Include the summary for each meeting.
@@ -1413,7 +1446,7 @@ class Fathom(BaseSDK):
1413
1446
  config=self.sdk_configuration,
1414
1447
  base_url=base_url or "",
1415
1448
  operation_id="createWebhook",
1416
- oauth2_scopes=[],
1449
+ oauth2_scopes=None,
1417
1450
  security_source=get_security_from_env(
1418
1451
  self.sdk_configuration.security, models.Security
1419
1452
  ),
@@ -1455,7 +1488,12 @@ class Fathom(BaseSDK):
1455
1488
 
1456
1489
 
1457
1490
  :param destination_url: The URL to send the webhook to.
1458
- :param triggered_for: You must send at least one of the following types of recordings to trigger on. - `my_recordings`: Your private recordings, as well as those you've shared with individuals. (On Team Plans, this excludes recordings you've shared with any teams.) - `shared_external_recordings`: Recordings shared with you by other users. (For Team Plans, this does not include recordings shared by other users on your Team Plan.) - `my_shared_with_team_recordings`: (Team Plans only). All recordings that you have shared with other teams (e.g. Marketing or Sales). Recordings you've shared with individuals but not with teams are not included. - `shared_team_recordings`: (Team Plans only) All recordings you can access from other users on your Team Plan, whether shared with you individually or with your team.
1491
+ :param triggered_for: You must send at least one of the following types of recordings to trigger on.
1492
+ - `my_recordings`: Your private recordings, as well as those you've shared with individuals. (On Team Plans, this excludes recordings you've shared with any teams.)
1493
+ - `shared_external_recordings`: Recordings shared with you by other users. (For Team Plans, this does not include recordings shared by other users on your Team Plan.)
1494
+ - `my_shared_with_team_recordings`: (Team Plans only). All recordings that you have shared with other teams (e.g. Marketing or Sales). Recordings you've shared with individuals but not with teams are not included.
1495
+ - `shared_team_recordings`: (Team Plans only) All recordings you can access from other users on your Team Plan, whether shared with you individually or with your team.
1496
+
1459
1497
  :param include_action_items: Include the action items for each meeting.
1460
1498
  :param include_crm_matches: Include CRM matches for each meeting. Only returns data from your or your team's linked CRM.
1461
1499
  :param include_summary: Include the summary for each meeting.
@@ -1516,7 +1554,7 @@ class Fathom(BaseSDK):
1516
1554
  config=self.sdk_configuration,
1517
1555
  base_url=base_url or "",
1518
1556
  operation_id="createWebhook",
1519
- oauth2_scopes=[],
1557
+ oauth2_scopes=None,
1520
1558
  security_source=get_security_from_env(
1521
1559
  self.sdk_configuration.security, models.Security
1522
1560
  ),
@@ -1599,7 +1637,7 @@ class Fathom(BaseSDK):
1599
1637
  config=self.sdk_configuration,
1600
1638
  base_url=base_url or "",
1601
1639
  operation_id="deleteWebhook",
1602
- oauth2_scopes=[],
1640
+ oauth2_scopes=None,
1603
1641
  security_source=get_security_from_env(
1604
1642
  self.sdk_configuration.security, models.Security
1605
1643
  ),
@@ -1682,7 +1720,7 @@ class Fathom(BaseSDK):
1682
1720
  config=self.sdk_configuration,
1683
1721
  base_url=base_url or "",
1684
1722
  operation_id="deleteWebhook",
1685
- oauth2_scopes=[],
1723
+ oauth2_scopes=None,
1686
1724
  security_source=get_security_from_env(
1687
1725
  self.sdk_configuration.security, models.Security
1688
1726
  ),
@@ -3,7 +3,9 @@
3
3
  import asyncio
4
4
  import random
5
5
  import time
6
- from typing import List
6
+ from datetime import datetime
7
+ from email.utils import parsedate_to_datetime
8
+ from typing import List, Optional
7
9
 
8
10
  import httpx
9
11
 
@@ -51,9 +53,11 @@ class Retries:
51
53
 
52
54
  class TemporaryError(Exception):
53
55
  response: httpx.Response
56
+ retry_after: Optional[int]
54
57
 
55
58
  def __init__(self, response: httpx.Response):
56
59
  self.response = response
60
+ self.retry_after = _parse_retry_after_header(response)
57
61
 
58
62
 
59
63
  class PermanentError(Exception):
@@ -63,6 +67,62 @@ class PermanentError(Exception):
63
67
  self.inner = inner
64
68
 
65
69
 
70
+ def _parse_retry_after_header(response: httpx.Response) -> Optional[int]:
71
+ """Parse Retry-After header from response.
72
+
73
+ Returns:
74
+ Retry interval in milliseconds, or None if header is missing or invalid.
75
+ """
76
+ retry_after_header = response.headers.get("retry-after")
77
+ if not retry_after_header:
78
+ return None
79
+
80
+ try:
81
+ seconds = float(retry_after_header)
82
+ return round(seconds * 1000)
83
+ except ValueError:
84
+ pass
85
+
86
+ try:
87
+ retry_date = parsedate_to_datetime(retry_after_header)
88
+ delta = (retry_date - datetime.now(retry_date.tzinfo)).total_seconds()
89
+ return round(max(0, delta) * 1000)
90
+ except (ValueError, TypeError):
91
+ pass
92
+
93
+ return None
94
+
95
+
96
+ def _get_sleep_interval(
97
+ exception: Exception,
98
+ initial_interval: int,
99
+ max_interval: int,
100
+ exponent: float,
101
+ retries: int,
102
+ ) -> float:
103
+ """Get sleep interval for retry with exponential backoff.
104
+
105
+ Args:
106
+ exception: The exception that triggered the retry.
107
+ initial_interval: Initial retry interval in milliseconds.
108
+ max_interval: Maximum retry interval in milliseconds.
109
+ exponent: Base for exponential backoff calculation.
110
+ retries: Current retry attempt count.
111
+
112
+ Returns:
113
+ Sleep interval in seconds.
114
+ """
115
+ if (
116
+ isinstance(exception, TemporaryError)
117
+ and exception.retry_after is not None
118
+ and exception.retry_after > 0
119
+ ):
120
+ return exception.retry_after / 1000
121
+
122
+ sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
123
+ return min(sleep, max_interval / 1000)
124
+
125
+
66
126
  def retry(func, retries: Retries):
67
127
  if retries.config.strategy == "backoff":
68
128
 
@@ -183,8 +243,10 @@ def retry_with_backoff(
183
243
  return exception.response
184
244
 
185
245
  raise
186
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
187
- sleep = min(sleep, max_interval / 1000)
246
+
247
+ sleep = _get_sleep_interval(
248
+ exception, initial_interval, max_interval, exponent, retries
249
+ )
188
250
  time.sleep(sleep)
189
251
  retries += 1
190
252
 
@@ -211,7 +273,9 @@ async def retry_with_backoff_async(
211
273
  return exception.response
212
274
 
213
275
  raise
214
- sleep = (initial_interval / 1000) * exponent**retries + random.uniform(0, 1)
215
- sleep = min(sleep, max_interval / 1000)
276
+
277
+ sleep = _get_sleep_interval(
278
+ exception, initial_interval, max_interval, exponent, retries
279
+ )
216
280
  await asyncio.sleep(sleep)
217
281
  retries += 1
@@ -1,12 +1,26 @@
1
1
  """Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT."""
2
2
 
3
- from typing import Any, Optional
3
+ from typing import Any, Optional, Type, TypeVar, overload
4
4
 
5
5
  import httpx
6
6
 
7
7
  from .serializers import unmarshal_json
8
8
  from fathom_python import errors
9
9
 
10
+ T = TypeVar("T")
11
+
12
+
13
+ @overload
14
+ def unmarshal_json_response(
15
+ typ: Type[T], http_res: httpx.Response, body: Optional[str] = None
16
+ ) -> T: ...
17
+
18
+
19
+ @overload
20
+ def unmarshal_json_response(
21
+ typ: Any, http_res: httpx.Response, body: Optional[str] = None
22
+ ) -> Any: ...
23
+
10
24
 
11
25
  def unmarshal_json_response(
12
26
  typ: Any, http_res: httpx.Response, body: Optional[str] = None
@@ -1,7 +1,7 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: fathom-python
3
- Version: 0.0.35
4
- Summary: Python Client SDK Generated by Speakeasy.
3
+ Version: 0.0.37
4
+ Summary: Fathom's official Python SDK.
5
5
  Author: Speakeasy
6
6
  Requires-Python: >=3.9.2
7
7
  Classifier: Programming Language :: Python :: 3
@@ -120,10 +120,7 @@ with Fathom(
120
120
  ),
121
121
  ) as fathom:
122
122
 
123
- res = fathom.list_meetings(calendar_invitees=[
124
- "cfo@acme.com",
125
- "legal@acme.com",
126
- ], calendar_invitees_domains=[
123
+ res = fathom.list_meetings(calendar_invitees_domains=[
127
124
  "acme.com",
128
125
  "client.com",
129
126
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -158,10 +155,7 @@ async def main():
158
155
  ),
159
156
  ) as fathom:
160
157
 
161
- res = await fathom.list_meetings_async(calendar_invitees=[
162
- "cfo@acme.com",
163
- "legal@acme.com",
164
- ], calendar_invitees_domains=[
158
+ res = await fathom.list_meetings_async(calendar_invitees_domains=[
165
159
  "acme.com",
166
160
  "client.com",
167
161
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -205,10 +199,7 @@ with Fathom(
205
199
  ),
206
200
  ) as fathom:
207
201
 
208
- res = fathom.list_meetings(calendar_invitees=[
209
- "cfo@acme.com",
210
- "legal@acme.com",
211
- ], calendar_invitees_domains=[
202
+ res = fathom.list_meetings(calendar_invitees_domains=[
212
203
  "acme.com",
213
204
  "client.com",
214
205
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -265,10 +256,7 @@ with Fathom(
265
256
  ),
266
257
  ) as fathom:
267
258
 
268
- res = fathom.list_meetings(calendar_invitees=[
269
- "cfo@acme.com",
270
- "legal@acme.com",
271
- ], calendar_invitees_domains=[
259
+ res = fathom.list_meetings(calendar_invitees_domains=[
272
260
  "acme.com",
273
261
  "client.com",
274
262
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -305,10 +293,7 @@ with Fathom(
305
293
  ),
306
294
  ) as fathom:
307
295
 
308
- res = fathom.list_meetings(calendar_invitees=[
309
- "cfo@acme.com",
310
- "legal@acme.com",
311
- ], calendar_invitees_domains=[
296
+ res = fathom.list_meetings(calendar_invitees_domains=[
312
297
  "acme.com",
313
298
  "client.com",
314
299
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -341,10 +326,7 @@ with Fathom(
341
326
  ),
342
327
  ) as fathom:
343
328
 
344
- res = fathom.list_meetings(calendar_invitees=[
345
- "cfo@acme.com",
346
- "legal@acme.com",
347
- ], calendar_invitees_domains=[
329
+ res = fathom.list_meetings(calendar_invitees_domains=[
348
330
  "acme.com",
349
331
  "client.com",
350
332
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -390,10 +372,7 @@ with Fathom(
390
372
  res = None
391
373
  try:
392
374
 
393
- res = fathom.list_meetings(calendar_invitees=[
394
- "cfo@acme.com",
395
- "legal@acme.com",
396
- ], calendar_invitees_domains=[
375
+ res = fathom.list_meetings(calendar_invitees_domains=[
397
376
  "acme.com",
398
377
  "client.com",
399
378
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -458,10 +437,7 @@ with Fathom(
458
437
  ),
459
438
  ) as fathom:
460
439
 
461
- res = fathom.list_meetings(calendar_invitees=[
462
- "cfo@acme.com",
463
- "legal@acme.com",
464
- ], calendar_invitees_domains=[
440
+ res = fathom.list_meetings(calendar_invitees_domains=[
465
441
  "acme.com",
466
442
  "client.com",
467
443
  ], calendar_invitees_domains_type=models.ListMeetingsCalendarInviteesDomainsType.ALL, include_action_items=False, include_crm_matches=False, include_summary=False, include_transcript=False, meeting_type=models.MeetingType.ALL, recorded_by=[
@@ -3,14 +3,14 @@ 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=LdSZtCM3m_Lp8jF8lPd6PQRjnrry_5gvzLs89RcEUfA,472
6
+ fathom_python/_version.py,sha256=7ENxqfJ7zvBym9ECFuFwsLek9Mt2t63GZyK-hugv-x4,470
7
7
  fathom_python/basesdk.py,sha256=HzY3rWonhPH0RZoEfNyWHy9q_eIvEfsVaf1jIMUGHhQ,12214
8
8
  fathom_python/errors/__init__.py,sha256=4aL9LIze2oNNs_l3aHDAu2HvD8EB0sMFfA9ikL53Lk4,1818
9
- fathom_python/errors/apierror.py,sha256=a7BEYi8Bh46jnAALCrTFnavGXRqpaOOISPdBWBLgax8,1283
10
- fathom_python/errors/fathomerror.py,sha256=VEu2eSLjVJCCkfgbQdqAgUBHae82C-3sW8zJXGSF5yo,950
11
- fathom_python/errors/no_response_error.py,sha256=Kb7hmMtDo72KrLSjUEDNeQxvzZiVxUjOZym8TPdZp5Y,462
12
- fathom_python/errors/responsevalidationerror.py,sha256=aXo7zRI3EDZfzuB7kmdJxxQuraVi6V0ECSeUVBbyYf4,750
13
- fathom_python/httpclient.py,sha256=Eu73urOAiZQtdUIyOUnPccxCiBbWEKrXG-JrRG3SLM4,3946
9
+ fathom_python/errors/apierror.py,sha256=OzB0d0_nV_nRc6ZvE01b-BEAm0pjuNPck0PF1BTjGfg,1288
10
+ fathom_python/errors/fathomerror.py,sha256=Y43URqKlm_y9uOPRiSFI8PA8V9TL4Zb7xz9oSbJ0ORQ,955
11
+ fathom_python/errors/no_response_error.py,sha256=DaZukP5ManflzAN-11MtmBitfTIct37sRvfszvfM13o,467
12
+ fathom_python/errors/responsevalidationerror.py,sha256=uhcnWCmoKmMTDq92osd_9feW54yrjijwkveLT_uKXlA,755
13
+ fathom_python/httpclient.py,sha256=dqTPONDBpRn4ktXfcetQiRXnG93f0pJkFhqsYFhLUac,3945
14
14
  fathom_python/models/__init__.py,sha256=d_FIMbDiWzyohNHVsZff7_UAiX_B6Uf2WbxgkRVdr0k,10042
15
15
  fathom_python/models/actionitem.py,sha256=Ab36zDi8torOZAMXyTfVlcbayc-m1114XDLVBMJSljE,849
16
16
  fathom_python/models/assignee.py,sha256=q7FZ4ai6dKZPBTP9cEVoYgwHyCWLkxjaTSy-9lu617U,1384
@@ -25,10 +25,10 @@ fathom_python/models/fathomuser.py,sha256=qwGGC5H-Dp2rmOa6THVcVfykXWABrFpn2oYDTY
25
25
  fathom_python/models/getrecordingsummaryop.py,sha256=buQ5qW4BRCU2buQ92rWqeiJ7ETNXOIsHyf8vMEiJMY4,3018
26
26
  fathom_python/models/getrecordingtranscriptop.py,sha256=JVv9N40odOPlw25prIgncqfkrpCQj7TerZ4yXry5oKY,2043
27
27
  fathom_python/models/invitee.py,sha256=DwyAGSStoB4VEgg8MtTHQyGeRr7mgGyJT0-aHrZoN9Q,1829
28
- fathom_python/models/listmeetingsop.py,sha256=T5QfI_hM5W0yzbH8-OJFR24hACHuYuJZEDzzF4FS4ug,7634
28
+ fathom_python/models/listmeetingsop.py,sha256=qMOjP5DfA7BNnXKY5u9PHOyMfL0xa2Kw_HsCxF9Q4_M,6803
29
29
  fathom_python/models/listteammembersop.py,sha256=Rtatvg_ZZZuAo95s7I6blWn_DEKXKug5-le7EyxKgVc,1218
30
30
  fathom_python/models/listteamsop.py,sha256=fjGGOkZed83n-MK6S7eYSinqUyeFNZ5dnJ7Tj-wY3nA,913
31
- fathom_python/models/meeting.py,sha256=Z5okXnQmFNf5H2dxJ8I_mdFmVyDItTq14AsYJ-LkVCk,3966
31
+ fathom_python/models/meeting.py,sha256=6gS36hvoM_s8ildFlFcNAngUuVF0qgtgsA1kmKjF4-w,4015
32
32
  fathom_python/models/meetinglistresponse.py,sha256=DWgl0mQn76jXk91xK9syGFaxw_g-7zUOUBGscLQSXNg,1501
33
33
  fathom_python/models/meetingsummary.py,sha256=AKmIdH7fci9FSEyHFEIoA0HnVvwhLURXNR2ZjexA1BY,1485
34
34
  fathom_python/models/security.py,sha256=hcxt1Cf-Bg5WplpU91H68EyvsxiMISup1sCJgilsjxQ,1032
@@ -37,10 +37,10 @@ fathom_python/models/teamlistresponse.py,sha256=7Sxs2CgfkOY1ROji1mJ6Wzpro54pL0ar
37
37
  fathom_python/models/teammember.py,sha256=Zrq8DeGXNB_x6QlumTdWTwYtStqkuypfC04N3DhSf2Y,401
38
38
  fathom_python/models/teammemberlistresponse.py,sha256=fItFDZd7RtXPHs-jfGJad8tuBoulg0600ciSsWPz-ug,1493
39
39
  fathom_python/models/transcriptitem.py,sha256=pGg4S32z86vBu0eaSLK1Tf1TvvvTZj10nJSRz8vW3JY,645
40
- fathom_python/models/transcriptitemspeaker.py,sha256=GFF9PKJtf0aHaB8x8dievopoT43JUIcOAj70oFi5ilE,547
40
+ fathom_python/models/transcriptitemspeaker.py,sha256=F4SH35bRpNLHZSGvWvWMlvG_WdfiNY9q0Lc01JjJCZU,1608
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=Awbe791PWKvWwtr1GBcMJ-xJS7cWOZJItqF6KKdjNWk,72546
43
+ fathom_python/sdk.py,sha256=xZDa11u2cVTZE0vy5yhJ6AL6W0o_gVTWi4boyaa0dWI,72000
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
@@ -55,12 +55,12 @@ fathom_python/utils/logger.py,sha256=CrS1hPx092pSNkAjzB3nnWoaiB0VyH_0L_H3dpLiFJ4
55
55
  fathom_python/utils/metadata.py,sha256=Per2KFXXOqOtoUWXrlIfjrSrBg199KrRW0nKQDgHIBU,3136
56
56
  fathom_python/utils/queryparams.py,sha256=MTK6inMS1_WwjmMJEJmAn67tSHHJyarpdGRlorRHEtI,5899
57
57
  fathom_python/utils/requestbodies.py,sha256=ySjEyjcLi731LNUahWvLOrES2HihuA8VrOJx4eQ7Qzg,2101
58
- fathom_python/utils/retries.py,sha256=6yhfZifqIat9i76xF0lTR2jLj1IN9BNGyqqxATlEFPU,6348
58
+ fathom_python/utils/retries.py,sha256=stPJEFtmK8gOM6aT0DpEJp9Z39oXX1-8I69jpa2n3Ww,8130
59
59
  fathom_python/utils/security.py,sha256=ObqK8V4EbMaHb9Gc3MpVs8mEY3F8I6H5Y_EsQf7lS0k,6133
60
60
  fathom_python/utils/serializers.py,sha256=Hndks5M_rJXVub_N5lu0gKZQUoEmWrn6PN7R-0HwvOE,5999
61
- fathom_python/utils/unmarshal_json_response.py,sha256=M1-rdgF0E7flFEKlOODnhlvvrvpdnD-ZF_E31FgEWVA,589
61
+ fathom_python/utils/unmarshal_json_response.py,sha256=n9xJiaI-is4GG3a_ls5n4sJc8KIeA6JU4mnZ9cbsPy4,878
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.35.dist-info/METADATA,sha256=wpx9jRqN6Fm20tekKiEDdWk_SbMBhG1rl2ynbjTxuDE,20716
65
- fathom_python-0.0.35.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
66
- fathom_python-0.0.35.dist-info/RECORD,,
64
+ fathom_python-0.0.37.dist-info/METADATA,sha256=Mktpj2WQVixLNEBEX41Bs-52XxguOXRCSqINLfbu3X4,20064
65
+ fathom_python-0.0.37.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
66
+ fathom_python-0.0.37.dist-info/RECORD,,