samsara-api 5.3.1__py3-none-any.whl → 5.4.1__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.
Files changed (28) hide show
  1. samsara/__init__.py +6 -0
  2. samsara/alerts/client.py +4 -0
  3. samsara/alerts/raw_client.py +4 -0
  4. samsara/beta_ap_is/client.py +0 -630
  5. samsara/beta_ap_is/raw_client.py +1496 -3144
  6. samsara/client.py +38 -0
  7. samsara/core/client_wrapper.py +2 -2
  8. samsara/media/client.py +4 -4
  9. samsara/media/raw_client.py +4 -4
  10. samsara/training_assignments/__init__.py +4 -0
  11. samsara/training_assignments/client.py +528 -0
  12. samsara/training_assignments/raw_client.py +1330 -0
  13. samsara/training_courses/__init__.py +4 -0
  14. samsara/training_courses/client.py +168 -0
  15. samsara/training_courses/raw_client.py +364 -0
  16. samsara/types/harsh_event_trigger_details_object_request_body_types_item.py +1 -0
  17. samsara/types/harsh_event_trigger_details_object_response_body_types_item.py +1 -0
  18. samsara/types/webhook_response_response_body_event_types_item.py +1 -0
  19. samsara/types/webhooks_get_webhook_response_body_event_types_item.py +1 -0
  20. samsara/types/webhooks_patch_webhook_response_body_event_types_item.py +1 -0
  21. samsara/types/webhooks_post_webhooks_response_body_event_types_item.py +1 -0
  22. samsara/types/workflow_trigger_object_request_body.py +2 -4
  23. samsara/types/workflow_trigger_object_response_body.py +2 -4
  24. samsara/webhooks/types/webhooks_post_webhooks_request_body_event_types_item.py +1 -0
  25. {samsara_api-5.3.1.dist-info → samsara_api-5.4.1.dist-info}/METADATA +1 -1
  26. {samsara_api-5.3.1.dist-info → samsara_api-5.4.1.dist-info}/RECORD +28 -22
  27. {samsara_api-5.3.1.dist-info → samsara_api-5.4.1.dist-info}/LICENSE +0 -0
  28. {samsara_api-5.3.1.dist-info → samsara_api-5.4.1.dist-info}/WHEEL +0 -0
samsara/client.py CHANGED
@@ -59,6 +59,8 @@ if typing.TYPE_CHECKING:
59
59
  from .tags.client import AsyncTagsClient, TagsClient
60
60
  from .trailer_assignments.client import AsyncTrailerAssignmentsClient, TrailerAssignmentsClient
61
61
  from .trailers.client import AsyncTrailersClient, TrailersClient
62
+ from .training_assignments.client import AsyncTrainingAssignmentsClient, TrainingAssignmentsClient
63
+ from .training_courses.client import AsyncTrainingCoursesClient, TrainingCoursesClient
62
64
  from .trips.client import AsyncTripsClient, TripsClient
63
65
  from .users.client import AsyncUsersClient, UsersClient
64
66
  from .vehicle_locations.client import AsyncVehicleLocationsClient, VehicleLocationsClient
@@ -179,6 +181,8 @@ class Samsara:
179
181
  self._safety: typing.Optional[SafetyClient] = None
180
182
  self._speeding_intervals: typing.Optional[SpeedingIntervalsClient] = None
181
183
  self._tags: typing.Optional[TagsClient] = None
184
+ self._training_assignments: typing.Optional[TrainingAssignmentsClient] = None
185
+ self._training_courses: typing.Optional[TrainingCoursesClient] = None
182
186
  self._trips: typing.Optional[TripsClient] = None
183
187
  self._users: typing.Optional[UsersClient] = None
184
188
  self._legacy: typing.Optional[LegacyClient] = None
@@ -540,6 +544,22 @@ class Samsara:
540
544
  self._tags = TagsClient(client_wrapper=self._client_wrapper)
541
545
  return self._tags
542
546
 
547
+ @property
548
+ def training_assignments(self):
549
+ if self._training_assignments is None:
550
+ from .training_assignments.client import TrainingAssignmentsClient # noqa: E402
551
+
552
+ self._training_assignments = TrainingAssignmentsClient(client_wrapper=self._client_wrapper)
553
+ return self._training_assignments
554
+
555
+ @property
556
+ def training_courses(self):
557
+ if self._training_courses is None:
558
+ from .training_courses.client import TrainingCoursesClient # noqa: E402
559
+
560
+ self._training_courses = TrainingCoursesClient(client_wrapper=self._client_wrapper)
561
+ return self._training_courses
562
+
543
563
  @property
544
564
  def trips(self):
545
565
  if self._trips is None:
@@ -716,6 +736,8 @@ class AsyncSamsara:
716
736
  self._safety: typing.Optional[AsyncSafetyClient] = None
717
737
  self._speeding_intervals: typing.Optional[AsyncSpeedingIntervalsClient] = None
718
738
  self._tags: typing.Optional[AsyncTagsClient] = None
739
+ self._training_assignments: typing.Optional[AsyncTrainingAssignmentsClient] = None
740
+ self._training_courses: typing.Optional[AsyncTrainingCoursesClient] = None
719
741
  self._trips: typing.Optional[AsyncTripsClient] = None
720
742
  self._users: typing.Optional[AsyncUsersClient] = None
721
743
  self._legacy: typing.Optional[AsyncLegacyClient] = None
@@ -1079,6 +1101,22 @@ class AsyncSamsara:
1079
1101
  self._tags = AsyncTagsClient(client_wrapper=self._client_wrapper)
1080
1102
  return self._tags
1081
1103
 
1104
+ @property
1105
+ def training_assignments(self):
1106
+ if self._training_assignments is None:
1107
+ from .training_assignments.client import AsyncTrainingAssignmentsClient # noqa: E402
1108
+
1109
+ self._training_assignments = AsyncTrainingAssignmentsClient(client_wrapper=self._client_wrapper)
1110
+ return self._training_assignments
1111
+
1112
+ @property
1113
+ def training_courses(self):
1114
+ if self._training_courses is None:
1115
+ from .training_courses.client import AsyncTrainingCoursesClient # noqa: E402
1116
+
1117
+ self._training_courses = AsyncTrainingCoursesClient(client_wrapper=self._client_wrapper)
1118
+ return self._training_courses
1119
+
1082
1120
  @property
1083
1121
  def trips(self):
1084
1122
  if self._trips is None:
@@ -24,12 +24,12 @@ class BaseClientWrapper:
24
24
  import platform
25
25
 
26
26
  headers: typing.Dict[str, str] = {
27
- "User-Agent": "samsara-api/5.3.1",
27
+ "User-Agent": "samsara-api/5.4.1",
28
28
  "X-Fern-Language": "Python",
29
29
  "X-Fern-Runtime": f"python/{platform.python_version()}",
30
30
  "X-Fern-Platform": f"{platform.system().lower()}/{platform.release()}",
31
31
  "X-Fern-SDK-Name": "samsara-api",
32
- "X-Fern-SDK-Version": "5.3.1",
32
+ "X-Fern-SDK-Version": "5.4.1",
33
33
  **(self.get_custom_headers() or {}),
34
34
  }
35
35
  headers["Authorization"] = f"Bearer {self._get_token()}"
samsara/media/client.py CHANGED
@@ -63,7 +63,7 @@ class MediaClient:
63
63
  """
64
64
  This endpoint returns a list of all uploaded media (video and still images) matching query parameters, with a maximum query range of one day. Additional media can be retrieved with the [Create a media retrieval request](https://developers.samsara.com/reference/postmediaretrieval) endpoint, and they will be included in the list after they are uploaded. Urls provided by this endpoint expire in 8 hours.
65
65
 
66
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
66
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
67
67
 
68
68
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
69
69
 
@@ -136,7 +136,7 @@ class MediaClient:
136
136
  """
137
137
  This endpoint returns media information corresponding to a retrieval ID. Retrieval IDs are associated to prior [media retrieval requests](https://developers.samsara.com/reference/postmediaretrieval). Urls provided by this endpoint expire in 8 hours.
138
138
 
139
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
139
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
140
140
 
141
141
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
142
142
 
@@ -282,7 +282,7 @@ class AsyncMediaClient:
282
282
  """
283
283
  This endpoint returns a list of all uploaded media (video and still images) matching query parameters, with a maximum query range of one day. Additional media can be retrieved with the [Create a media retrieval request](https://developers.samsara.com/reference/postmediaretrieval) endpoint, and they will be included in the list after they are uploaded. Urls provided by this endpoint expire in 8 hours.
284
284
 
285
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
285
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
286
286
 
287
287
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
288
288
 
@@ -363,7 +363,7 @@ class AsyncMediaClient:
363
363
  """
364
364
  This endpoint returns media information corresponding to a retrieval ID. Retrieval IDs are associated to prior [media retrieval requests](https://developers.samsara.com/reference/postmediaretrieval). Urls provided by this endpoint expire in 8 hours.
365
365
 
366
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
366
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
367
367
 
368
368
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
369
369
 
@@ -64,7 +64,7 @@ class RawMediaClient:
64
64
  """
65
65
  This endpoint returns a list of all uploaded media (video and still images) matching query parameters, with a maximum query range of one day. Additional media can be retrieved with the [Create a media retrieval request](https://developers.samsara.com/reference/postmediaretrieval) endpoint, and they will be included in the list after they are uploaded. Urls provided by this endpoint expire in 8 hours.
66
66
 
67
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
67
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
68
68
 
69
69
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
70
70
 
@@ -240,7 +240,7 @@ class RawMediaClient:
240
240
  """
241
241
  This endpoint returns media information corresponding to a retrieval ID. Retrieval IDs are associated to prior [media retrieval requests](https://developers.samsara.com/reference/postmediaretrieval). Urls provided by this endpoint expire in 8 hours.
242
242
 
243
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
243
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
244
244
 
245
245
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
246
246
 
@@ -588,7 +588,7 @@ class AsyncRawMediaClient:
588
588
  """
589
589
  This endpoint returns a list of all uploaded media (video and still images) matching query parameters, with a maximum query range of one day. Additional media can be retrieved with the [Create a media retrieval request](https://developers.samsara.com/reference/postmediaretrieval) endpoint, and they will be included in the list after they are uploaded. Urls provided by this endpoint expire in 8 hours.
590
590
 
591
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
591
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
592
592
 
593
593
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
594
594
 
@@ -764,7 +764,7 @@ class AsyncRawMediaClient:
764
764
  """
765
765
  This endpoint returns media information corresponding to a retrieval ID. Retrieval IDs are associated to prior [media retrieval requests](https://developers.samsara.com/reference/postmediaretrieval). Urls provided by this endpoint expire in 8 hours.
766
766
 
767
- <b>Rate limit:</b> 100 requests/min (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
767
+ <b>Rate limit:</b> 5 requests/sec (learn more about rate limits <a href="https://developers.samsara.com/docs/rate-limits" target="_blank">here</a>).
768
768
 
769
769
  To use this endpoint, select **Read Media Retrieval** under the Safety & Cameras category when creating or editing an API token. <a href="https://developers.samsara.com/docs/authentication#scopes-for-api-tokens" target="_blank">Learn More.</a>
770
770
 
@@ -0,0 +1,4 @@
1
+ # This file was auto-generated by Fern from our API Definition.
2
+
3
+ # isort: skip_file
4
+