nominal-api 0.563.0__py3-none-any.whl → 0.564.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.

Potentially problematic release.


This version of nominal-api might be problematic. Click here for more details.

nominal_api/__init__.py CHANGED
@@ -69,5 +69,5 @@ __all__ = [
69
69
 
70
70
  __conjure_generator_version__ = "4.9.0"
71
71
 
72
- __version__ = "0.563.0"
72
+ __version__ = "0.564.1"
73
73
 
nominal_api/_impl.py CHANGED
@@ -7356,31 +7356,24 @@ ingest_api_IngestMcapRequest.__module__ = "nominal_api.ingest_api"
7356
7356
 
7357
7357
  class ingest_api_IngestMcapResponse(ConjureBeanType):
7358
7358
  """
7359
- Returns references to the data ingested from an MCAP file, along with a rid to monitor the progress of the
7360
- ingestion.
7359
+ Returns references to the data ingested from an MCAP file.
7361
7360
  """
7362
7361
 
7363
7362
  @builtins.classmethod
7364
7363
  def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
7365
7364
  return {
7366
- 'outputs': ConjureFieldDefinition('outputs', List[ingest_api_McapIngestionOutput]),
7367
- 'async_handle': ConjureFieldDefinition('asyncHandle', ingest_api_AsyncHandle)
7365
+ 'outputs': ConjureFieldDefinition('outputs', List[ingest_api_McapIngestionOutput])
7368
7366
  }
7369
7367
 
7370
- __slots__: List[str] = ['_outputs', '_async_handle']
7368
+ __slots__: List[str] = ['_outputs']
7371
7369
 
7372
- def __init__(self, async_handle: "ingest_api_AsyncHandle", outputs: List["ingest_api_McapIngestionOutput"]) -> None:
7370
+ def __init__(self, outputs: List["ingest_api_McapIngestionOutput"]) -> None:
7373
7371
  self._outputs = outputs
7374
- self._async_handle = async_handle
7375
7372
 
7376
7373
  @builtins.property
7377
7374
  def outputs(self) -> List["ingest_api_McapIngestionOutput"]:
7378
7375
  return self._outputs
7379
7376
 
7380
- @builtins.property
7381
- def async_handle(self) -> "ingest_api_AsyncHandle":
7382
- return self._async_handle
7383
-
7384
7377
 
7385
7378
  ingest_api_IngestMcapResponse.__name__ = "IngestMcapResponse"
7386
7379
  ingest_api_IngestMcapResponse.__qualname__ = "IngestMcapResponse"
@@ -8205,24 +8198,18 @@ class ingest_api_IngestVideoResponse(ConjureBeanType):
8205
8198
  @builtins.classmethod
8206
8199
  def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
8207
8200
  return {
8208
- 'video_rid': ConjureFieldDefinition('videoRid', api_rids_VideoRid),
8209
- 'async_handle': ConjureFieldDefinition('asyncHandle', ingest_api_AsyncHandle)
8201
+ 'video_rid': ConjureFieldDefinition('videoRid', api_rids_VideoRid)
8210
8202
  }
8211
8203
 
8212
- __slots__: List[str] = ['_video_rid', '_async_handle']
8204
+ __slots__: List[str] = ['_video_rid']
8213
8205
 
8214
- def __init__(self, async_handle: "ingest_api_AsyncHandle", video_rid: str) -> None:
8206
+ def __init__(self, video_rid: str) -> None:
8215
8207
  self._video_rid = video_rid
8216
- self._async_handle = async_handle
8217
8208
 
8218
8209
  @builtins.property
8219
8210
  def video_rid(self) -> str:
8220
8211
  return self._video_rid
8221
8212
 
8222
- @builtins.property
8223
- def async_handle(self) -> "ingest_api_AsyncHandle":
8224
- return self._async_handle
8225
-
8226
8213
 
8227
8214
  ingest_api_IngestVideoResponse.__name__ = "IngestVideoResponse"
8228
8215
  ingest_api_IngestVideoResponse.__qualname__ = "IngestVideoResponse"
@@ -61824,6 +61811,41 @@ class scout_video_VideoSegmentService(Service):
61824
61811
  at the segment-level.
61825
61812
  """
61826
61813
 
61814
+ def get_segment_data(self, auth_header: str, segment_rid: str, video_rid: str) -> Any:
61815
+ """
61816
+ Retrieves the raw bytes of a video segment. The data will be returned as a transport stream.
61817
+ """
61818
+
61819
+ _headers: Dict[str, Any] = {
61820
+ 'Accept': 'application/octet-stream',
61821
+ 'Authorization': auth_header,
61822
+ }
61823
+
61824
+ _params: Dict[str, Any] = {
61825
+ }
61826
+
61827
+ _path_params: Dict[str, Any] = {
61828
+ 'videoRid': video_rid,
61829
+ 'segmentRid': segment_rid,
61830
+ }
61831
+
61832
+ _json: Any = None
61833
+
61834
+ _path = '/video/v1/videos/{videoRid}/segments/{segmentRid}'
61835
+ _path = _path.format(**_path_params)
61836
+
61837
+ _response: Response = self._request(
61838
+ 'GET',
61839
+ self._uri + _path,
61840
+ params=_params,
61841
+ headers=_headers,
61842
+ stream=True,
61843
+ json=_json)
61844
+
61845
+ _raw = _response.raw
61846
+ _raw.decode_content = True
61847
+ return _raw
61848
+
61827
61849
  def create_segments(self, auth_header: str, request: "scout_video_api_CreateSegmentsRequest", video_rid: str) -> "scout_video_api_CreateSegmentsResponse":
61828
61850
 
61829
61851
  _headers: Dict[str, Any] = {
@@ -62246,36 +62268,6 @@ links to all of the segments in the video in sequential order.
62246
62268
  _raw.decode_content = True
62247
62269
  return _raw
62248
62270
 
62249
- def update_target_duration(self, auth_header: str, request: "scout_video_api_UpdateTargetDurationRequest", video_rid: str) -> "scout_video_api_UpdateTargetDurationResponse":
62250
-
62251
- _headers: Dict[str, Any] = {
62252
- 'Accept': 'application/json',
62253
- 'Content-Type': 'application/json',
62254
- 'Authorization': auth_header,
62255
- }
62256
-
62257
- _params: Dict[str, Any] = {
62258
- }
62259
-
62260
- _path_params: Dict[str, Any] = {
62261
- 'videoRid': video_rid,
62262
- }
62263
-
62264
- _json: Any = ConjureEncoder().default(request)
62265
-
62266
- _path = '/video/v1/videos/{videoRid}/target-duration'
62267
- _path = _path.format(**_path_params)
62268
-
62269
- _response: Response = self._request(
62270
- 'PUT',
62271
- self._uri + _path,
62272
- params=_params,
62273
- headers=_headers,
62274
- json=_json)
62275
-
62276
- _decoder = ConjureDecoder()
62277
- return _decoder.decode(_response.json(), scout_video_api_UpdateTargetDurationResponse, self._return_none_for_unknown_union_types)
62278
-
62279
62271
  def get_segment_summaries(self, auth_header: str, video_rid: str) -> List["scout_video_api_SegmentSummary"]:
62280
62272
  """
62281
62273
  Returns the min and max absolute and media timestamps for each segment in a video. To be used during
@@ -63369,33 +63361,48 @@ class scout_video_api_SegmentTimestamps(ConjureUnionType):
63369
63361
  be frame-mapped. Without a frame-timestamp mapping manifest file, a list of absolute timestamps will be
63370
63362
  automatically assigned to each segment based on media timestamps.. Otherwise, media timestamps will be
63371
63363
  extracted and mapped to those in the provided manifest."""
63364
+ _timestamps: Optional[List["api_Timestamp"]] = None
63372
63365
  _timestamp_mappings: Optional["scout_video_api_TimestampMappings"] = None
63373
63366
 
63374
63367
  @builtins.classmethod
63375
63368
  def _options(cls) -> Dict[str, ConjureFieldDefinition]:
63376
63369
  return {
63370
+ 'timestamps': ConjureFieldDefinition('timestamps', List[api_Timestamp]),
63377
63371
  'timestamp_mappings': ConjureFieldDefinition('timestampMappings', scout_video_api_TimestampMappings)
63378
63372
  }
63379
63373
 
63380
63374
  def __init__(
63381
63375
  self,
63376
+ timestamps: Optional[List["api_Timestamp"]] = None,
63382
63377
  timestamp_mappings: Optional["scout_video_api_TimestampMappings"] = None,
63383
63378
  type_of_union: Optional[str] = None
63384
63379
  ) -> None:
63385
63380
  if type_of_union is None:
63386
- if (timestamp_mappings is not None) != 1:
63381
+ if (timestamps is not None) + (timestamp_mappings is not None) != 1:
63387
63382
  raise ValueError('a union must contain a single member')
63388
63383
 
63384
+ if timestamps is not None:
63385
+ self._timestamps = timestamps
63386
+ self._type = 'timestamps'
63389
63387
  if timestamp_mappings is not None:
63390
63388
  self._timestamp_mappings = timestamp_mappings
63391
63389
  self._type = 'timestampMappings'
63392
63390
 
63391
+ elif type_of_union == 'timestamps':
63392
+ if timestamps is None:
63393
+ raise ValueError('a union value must not be None')
63394
+ self._timestamps = timestamps
63395
+ self._type = 'timestamps'
63393
63396
  elif type_of_union == 'timestampMappings':
63394
63397
  if timestamp_mappings is None:
63395
63398
  raise ValueError('a union value must not be None')
63396
63399
  self._timestamp_mappings = timestamp_mappings
63397
63400
  self._type = 'timestampMappings'
63398
63401
 
63402
+ @builtins.property
63403
+ def timestamps(self) -> Optional[List["api_Timestamp"]]:
63404
+ return self._timestamps
63405
+
63399
63406
  @builtins.property
63400
63407
  def timestamp_mappings(self) -> Optional["scout_video_api_TimestampMappings"]:
63401
63408
  return self._timestamp_mappings
@@ -63403,6 +63410,8 @@ extracted and mapped to those in the provided manifest."""
63403
63410
  def accept(self, visitor) -> Any:
63404
63411
  if not isinstance(visitor, scout_video_api_SegmentTimestampsVisitor):
63405
63412
  raise ValueError('{} is not an instance of scout_video_api_SegmentTimestampsVisitor'.format(visitor.__class__.__name__))
63413
+ if self._type == 'timestamps' and self.timestamps is not None:
63414
+ return visitor._timestamps(self.timestamps)
63406
63415
  if self._type == 'timestampMappings' and self.timestamp_mappings is not None:
63407
63416
  return visitor._timestamp_mappings(self.timestamp_mappings)
63408
63417
 
@@ -63414,6 +63423,10 @@ scout_video_api_SegmentTimestamps.__module__ = "nominal_api.scout_video_api"
63414
63423
 
63415
63424
  class scout_video_api_SegmentTimestampsVisitor:
63416
63425
 
63426
+ @abstractmethod
63427
+ def _timestamps(self, timestamps: List["api_Timestamp"]) -> Any:
63428
+ pass
63429
+
63417
63430
  @abstractmethod
63418
63431
  def _timestamp_mappings(self, timestamp_mappings: "scout_video_api_TimestampMappings") -> Any:
63419
63432
  pass
@@ -63639,60 +63652,6 @@ scout_video_api_UpdateIngestStatusRequest.__qualname__ = "UpdateIngestStatusRequ
63639
63652
  scout_video_api_UpdateIngestStatusRequest.__module__ = "nominal_api.scout_video_api"
63640
63653
 
63641
63654
 
63642
- class scout_video_api_UpdateTargetDurationRequest(ConjureBeanType):
63643
-
63644
- @builtins.classmethod
63645
- def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
63646
- return {
63647
- 'target_duration_seconds': ConjureFieldDefinition('targetDurationSeconds', float)
63648
- }
63649
-
63650
- __slots__: List[str] = ['_target_duration_seconds']
63651
-
63652
- def __init__(self, target_duration_seconds: float) -> None:
63653
- self._target_duration_seconds = target_duration_seconds
63654
-
63655
- @builtins.property
63656
- def target_duration_seconds(self) -> float:
63657
- """
63658
- A value used to construct the HLS playlist which must be greater than or equal to the durations of all
63659
- the segments within a video, when rounded to the nearest integer.
63660
- """
63661
- return self._target_duration_seconds
63662
-
63663
-
63664
- scout_video_api_UpdateTargetDurationRequest.__name__ = "UpdateTargetDurationRequest"
63665
- scout_video_api_UpdateTargetDurationRequest.__qualname__ = "UpdateTargetDurationRequest"
63666
- scout_video_api_UpdateTargetDurationRequest.__module__ = "nominal_api.scout_video_api"
63667
-
63668
-
63669
- class scout_video_api_UpdateTargetDurationResponse(ConjureBeanType):
63670
-
63671
- @builtins.classmethod
63672
- def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
63673
- return {
63674
- 'target_duration_seconds': ConjureFieldDefinition('targetDurationSeconds', float)
63675
- }
63676
-
63677
- __slots__: List[str] = ['_target_duration_seconds']
63678
-
63679
- def __init__(self, target_duration_seconds: float) -> None:
63680
- self._target_duration_seconds = target_duration_seconds
63681
-
63682
- @builtins.property
63683
- def target_duration_seconds(self) -> float:
63684
- """
63685
- If the video already has a target duration, then the returned target duration will be the max of the one
63686
- sent in the request and the existing target duration.
63687
- """
63688
- return self._target_duration_seconds
63689
-
63690
-
63691
- scout_video_api_UpdateTargetDurationResponse.__name__ = "UpdateTargetDurationResponse"
63692
- scout_video_api_UpdateTargetDurationResponse.__qualname__ = "UpdateTargetDurationResponse"
63693
- scout_video_api_UpdateTargetDurationResponse.__module__ = "nominal_api.scout_video_api"
63694
-
63695
-
63696
63655
  class scout_video_api_UpdateVideoFileRequest(ConjureBeanType):
63697
63656
  """
63698
63657
  Request to update metadata for a given video file.
@@ -64382,28 +64341,19 @@ class scout_video_api_VideoOriginMetadata(ConjureBeanType):
64382
64341
  def _fields(cls) -> Dict[str, ConjureFieldDefinition]:
64383
64342
  return {
64384
64343
  'video_sources': ConjureFieldDefinition('videoSources', List[api_Handle]),
64385
- 'video_sources_original_handles': ConjureFieldDefinition('videoSourcesOriginalHandles', OptionalTypeWrapper[List[api_Handle]]),
64386
64344
  'timestamp_manifest': ConjureFieldDefinition('timestampManifest', scout_video_api_VideoTimestampManifest)
64387
64345
  }
64388
64346
 
64389
- __slots__: List[str] = ['_video_sources', '_video_sources_original_handles', '_timestamp_manifest']
64347
+ __slots__: List[str] = ['_video_sources', '_timestamp_manifest']
64390
64348
 
64391
- def __init__(self, timestamp_manifest: "scout_video_api_VideoTimestampManifest", video_sources: List["api_Handle"], video_sources_original_handles: Optional[List["api_Handle"]] = None) -> None:
64349
+ def __init__(self, timestamp_manifest: "scout_video_api_VideoTimestampManifest", video_sources: List["api_Handle"]) -> None:
64392
64350
  self._video_sources = video_sources
64393
- self._video_sources_original_handles = video_sources_original_handles
64394
64351
  self._timestamp_manifest = timestamp_manifest
64395
64352
 
64396
64353
  @builtins.property
64397
64354
  def video_sources(self) -> List["api_Handle"]:
64398
64355
  return self._video_sources
64399
64356
 
64400
- @builtins.property
64401
- def video_sources_original_handles(self) -> Optional[List["api_Handle"]]:
64402
- """
64403
- Will be present if the handles were copied from a different bucket to the Nominal bucket.
64404
- """
64405
- return self._video_sources_original_handles
64406
-
64407
64357
  @builtins.property
64408
64358
  def timestamp_manifest(self) -> "scout_video_api_VideoTimestampManifest":
64409
64359
  return self._timestamp_manifest
@@ -35,8 +35,6 @@ from .._impl import (
35
35
  scout_video_api_UpdateIngestStatus as UpdateIngestStatus,
36
36
  scout_video_api_UpdateIngestStatusRequest as UpdateIngestStatusRequest,
37
37
  scout_video_api_UpdateIngestStatusVisitor as UpdateIngestStatusVisitor,
38
- scout_video_api_UpdateTargetDurationRequest as UpdateTargetDurationRequest,
39
- scout_video_api_UpdateTargetDurationResponse as UpdateTargetDurationResponse,
40
38
  scout_video_api_UpdateVideoFileRequest as UpdateVideoFileRequest,
41
39
  scout_video_api_UpdateVideoMetadataRequest as UpdateVideoMetadataRequest,
42
40
  scout_video_api_Video as Video,
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: nominal-api
3
- Version: 0.563.0
3
+ Version: 0.564.1
4
4
  Requires-Python: >=3.8
5
5
  Requires-Dist: requests
6
6
  Requires-Dist: conjure-python-client<3,>=2.8.0
@@ -1,5 +1,5 @@
1
- nominal_api/__init__.py,sha256=M7b1Q3JDpVaIH1PrVLwb5Nfij4pjdjUVyQk6vRbk5oY,1791
2
- nominal_api/_impl.py,sha256=wX4r8S-aD_NkPwKDXcnBjsr9H6BSkgdjldt5pJ-JRlc,2751758
1
+ nominal_api/__init__.py,sha256=0mlkw5OV5BapyHOPhMOi0dbf-XifTaifctw2GXKrScs,1791
2
+ nominal_api/_impl.py,sha256=NiLnyHWjOcsSZQwyQIi3vHE2eU7iriQ6V_0N2GQwuPw,2749290
3
3
  nominal_api/py.typed,sha256=eoZ6GfifbqhMLNzjlqRDVil-yyBkOmVN9ujSgJWNBlY,15
4
4
  nominal_api/api/__init__.py,sha256=kJBEE_HLVpKYdLH12KyO-cSAVzwxYpBwaaDutCtT-LM,1236
5
5
  nominal_api/api_rids/__init__.py,sha256=MwCU7tf4EQBdNPY12rgPdr4y11iowEXxYqtNCvw7sdo,380
@@ -52,7 +52,7 @@ nominal_api/scout_template_api/__init__.py,sha256=bsu8qPiZ4gf67G5iFvwsfkqEKJRZ7L
52
52
  nominal_api/scout_units_api/__init__.py,sha256=KxRDScfumX__0ncWJftGvgApn_LBTfnIBAvnaBrcA5A,368
53
53
  nominal_api/scout_versioning_api/__init__.py,sha256=Sf4T4t0rZXNRIZgkqLBN3yh0sAnrxiuzaTfDQVVkyO4,1323
54
54
  nominal_api/scout_video/__init__.py,sha256=zB7mM23yGAgC529rF4gjDmqcLRbsp0kJA3xef8meZko,200
55
- nominal_api/scout_video_api/__init__.py,sha256=VRcjlc11avwaCLaWHWlqcfDaNmYV0ScyfAsh8Oec47w,3404
55
+ nominal_api/scout_video_api/__init__.py,sha256=ns_kzZuuZPmvsFgMrX7n5xDktmOKw4iBExe7QtuowMA,3242
56
56
  nominal_api/scout_workbookcommon_api/__init__.py,sha256=6Ai0cYNOOw2A6JOlKzraTbpZwolspM-WTqVGLMN2HdI,413
57
57
  nominal_api/secrets_api/__init__.py,sha256=V5BpnbNzjdMP8kgvR2N6SEVcVyXi6Vyl_lh_5fKjJzw,736
58
58
  nominal_api/storage_datasource_api/__init__.py,sha256=jh_OZE_b4nBNAvnyenBjw8aGZOnvIXR6qvUKd31fXOk,445
@@ -66,7 +66,7 @@ nominal_api/timeseries_logicalseries_api/__init__.py,sha256=KuHLafDLeHzOTl0B6j7T
66
66
  nominal_api/timeseries_seriescache/__init__.py,sha256=tFCkNuyrVMgtj-HIl1pOYPJHaL2VikI4C_x97bX_Lcs,109
67
67
  nominal_api/timeseries_seriescache_api/__init__.py,sha256=U9EhlqdF9qzD1O9al0vcvcdgS_C5lq-lN3Kmr0K3g84,1191
68
68
  nominal_api/upload_api/__init__.py,sha256=ZMudWMSqCrNozohbHaJKuxJnT9Edepe7nxxXMz_pT9k,87
69
- nominal_api-0.563.0.dist-info/METADATA,sha256=e9GqnDv4uZ3oyU-hRlHOjGK4swnFli4J0lwxUyarX_Q,199
70
- nominal_api-0.563.0.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
71
- nominal_api-0.563.0.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
72
- nominal_api-0.563.0.dist-info/RECORD,,
69
+ nominal_api-0.564.1.dist-info/METADATA,sha256=i0ssG0AZre1AkCrJehLumFk4lIpmgidmA3aB71w95nE,199
70
+ nominal_api-0.564.1.dist-info/WHEEL,sha256=In9FTNxeP60KnTkGw7wk6mJPYd_dQSjEZmXdBdMCI-8,91
71
+ nominal_api-0.564.1.dist-info/top_level.txt,sha256=gI1ZdNJbuHcJZeKtCzzBXsEtpU1GX6XJKs6ksi_gCRA,12
72
+ nominal_api-0.564.1.dist-info/RECORD,,