fastpix-python 0.1.7__tar.gz → 1.0.0__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 (284) hide show
  1. fastpix_python-1.0.0/PKG-INFO +768 -0
  2. fastpix_python-1.0.0/README.md +750 -0
  3. fastpix_python-1.0.0/pyproject.toml +52 -0
  4. {fastpix_python-0.1.7 → fastpix_python-1.0.0}/setup.py +2 -2
  5. fastpix_python-1.0.0/src/Fastpix/__init__.py +17 -0
  6. fastpix_python-1.0.0/src/Fastpix/_hooks/__init__.py +4 -0
  7. fastpix_python-1.0.0/src/Fastpix/_hooks/sdkhooks.py +74 -0
  8. fastpix_python-1.0.0/src/Fastpix/_hooks/types.py +112 -0
  9. fastpix_python-1.0.0/src/Fastpix/_version.py +15 -0
  10. fastpix_python-1.0.0/src/Fastpix/basesdk.py +368 -0
  11. fastpix_python-1.0.0/src/Fastpix/dimensions.py +473 -0
  12. fastpix_python-1.0.0/src/Fastpix/drm_configurations.py +511 -0
  13. fastpix_python-1.0.0/src/Fastpix/errors/__init__.py +239 -0
  14. fastpix_python-1.0.0/src/Fastpix/errors/badrequest_error.py +33 -0
  15. fastpix_python-1.0.0/src/Fastpix/errors/duplicatemp4support_error.py +35 -0
  16. fastpix_python-1.0.0/src/Fastpix/errors/duplicatereferenceiderrorresponse.py +39 -0
  17. fastpix_python-1.0.0/src/Fastpix/errors/enable_live_streamop.py +34 -0
  18. fastpix_python-1.0.0/src/Fastpix/errors/fastpixdefaulterror.py +40 -0
  19. fastpix_python-1.0.0/src/Fastpix/errors/fastpixerror.py +30 -0
  20. fastpix_python-1.0.0/src/Fastpix/errors/forbidden_error.py +33 -0
  21. fastpix_python-1.0.0/src/Fastpix/errors/forbiddenresponse_error.py +35 -0
  22. fastpix_python-1.0.0/src/Fastpix/errors/invalidpermission_error.py +35 -0
  23. fastpix_python-1.0.0/src/Fastpix/errors/invalidplaylistidresponse_error.py +37 -0
  24. fastpix_python-1.0.0/src/Fastpix/errors/livenotfounderror.py +33 -0
  25. fastpix_python-1.0.0/src/Fastpix/errors/mediaclipnotfound_error.py +35 -0
  26. fastpix_python-1.0.0/src/Fastpix/errors/medianotfound_error.py +33 -0
  27. fastpix_python-1.0.0/src/Fastpix/errors/mediaorplaybacknotfound_error.py +37 -0
  28. fastpix_python-1.0.0/src/Fastpix/errors/no_response_error.py +17 -0
  29. fastpix_python-1.0.0/src/Fastpix/errors/notfounderror.py +31 -0
  30. fastpix_python-1.0.0/src/Fastpix/errors/notfounderrorplaybackid.py +35 -0
  31. fastpix_python-1.0.0/src/Fastpix/errors/notfounderrorsimulcast.py +35 -0
  32. fastpix_python-1.0.0/src/Fastpix/errors/responsevalidationerror.py +11 -0
  33. fastpix_python-1.0.0/src/Fastpix/errors/signingkeynotfounderror.py +35 -0
  34. fastpix_python-1.0.0/src/Fastpix/errors/simulcastunavailable_error.py +37 -0
  35. fastpix_python-1.0.0/src/Fastpix/errors/streamalreadydisablederror.py +37 -0
  36. fastpix_python-1.0.0/src/Fastpix/errors/streamalreadyenablederror.py +37 -0
  37. fastpix_python-1.0.0/src/Fastpix/errors/trackduplicaterequest_error.py +37 -0
  38. fastpix_python-1.0.0/src/Fastpix/errors/trialplanrestrictionerror.py +37 -0
  39. fastpix_python-1.0.0/src/Fastpix/errors/unauthorized_error.py +33 -0
  40. fastpix_python-1.0.0/src/Fastpix/errors/unauthorizedresponse_error.py +35 -0
  41. fastpix_python-1.0.0/src/Fastpix/errors/validationerrorresponse.py +19 -0
  42. fastpix_python-1.0.0/src/Fastpix/errors/viewnotfound_error.py +33 -0
  43. fastpix_python-1.0.0/src/Fastpix/errors.py +271 -0
  44. fastpix_python-1.0.0/src/Fastpix/httpclient.py +125 -0
  45. fastpix_python-1.0.0/src/Fastpix/in_video_ai_features.py +1131 -0
  46. fastpix_python-1.0.0/src/Fastpix/input_video.py +729 -0
  47. fastpix_python-1.0.0/src/Fastpix/live_playback.py +743 -0
  48. fastpix_python-1.0.0/src/Fastpix/manage_live_stream.py +1973 -0
  49. fastpix_python-1.0.0/src/Fastpix/manage_videos.py +4123 -0
  50. fastpix_python-1.0.0/src/Fastpix/metrics.py +1117 -0
  51. fastpix_python-1.0.0/src/Fastpix/models/__init__.py +2097 -0
  52. fastpix_python-1.0.0/src/Fastpix/models/accesspolicy.py +12 -0
  53. fastpix_python-1.0.0/src/Fastpix/models/add_media_to_playlistop.py +28 -0
  54. fastpix_python-1.0.0/src/Fastpix/models/add_media_trackop.py +59 -0
  55. fastpix_python-1.0.0/src/Fastpix/models/addtrackrequest.py +43 -0
  56. fastpix_python-1.0.0/src/Fastpix/models/addtrackresponse.py +48 -0
  57. fastpix_python-1.0.0/src/Fastpix/models/audioinput.py +67 -0
  58. fastpix_python-1.0.0/src/Fastpix/models/badrequest_error.py +34 -0
  59. fastpix_python-1.0.0/src/Fastpix/models/basicaccesspolicy.py +11 -0
  60. fastpix_python-1.0.0/src/Fastpix/models/browsernamedimensiondetails.py +27 -0
  61. fastpix_python-1.0.0/src/Fastpix/models/cancel_uploadop.py +42 -0
  62. fastpix_python-1.0.0/src/Fastpix/models/change_media_order_in_playlistop.py +28 -0
  63. fastpix_python-1.0.0/src/Fastpix/models/chaptersresponse.py +20 -0
  64. fastpix_python-1.0.0/src/Fastpix/models/complete_live_streamop.py +21 -0
  65. fastpix_python-1.0.0/src/Fastpix/models/create_media_playback_idop.py +128 -0
  66. fastpix_python-1.0.0/src/Fastpix/models/create_playbackid_of_streamop.py +28 -0
  67. fastpix_python-1.0.0/src/Fastpix/models/create_simulcast_of_streamop.py +28 -0
  68. fastpix_python-1.0.0/src/Fastpix/models/createlivestreamrequest.py +79 -0
  69. fastpix_python-1.0.0/src/Fastpix/models/createmediarequest.py +333 -0
  70. fastpix_python-1.0.0/src/Fastpix/models/createmediaresponse.py +74 -0
  71. fastpix_python-1.0.0/src/Fastpix/models/createmediasuccessresponse.py +19 -0
  72. fastpix_python-1.0.0/src/Fastpix/models/createplaylistrequest.py +81 -0
  73. fastpix_python-1.0.0/src/Fastpix/models/createresponse.py +25 -0
  74. fastpix_python-1.0.0/src/Fastpix/models/createsigningkeyresponsedto.py +32 -0
  75. fastpix_python-1.0.0/src/Fastpix/models/datapagination.py +49 -0
  76. fastpix_python-1.0.0/src/Fastpix/models/daterange.py +22 -0
  77. fastpix_python-1.0.0/src/Fastpix/models/delete_a_playlistop.py +21 -0
  78. fastpix_python-1.0.0/src/Fastpix/models/delete_live_streamop.py +21 -0
  79. fastpix_python-1.0.0/src/Fastpix/models/delete_media_from_playlistop.py +29 -0
  80. fastpix_python-1.0.0/src/Fastpix/models/delete_media_playback_idop.py +45 -0
  81. fastpix_python-1.0.0/src/Fastpix/models/delete_media_trackop.py +45 -0
  82. fastpix_python-1.0.0/src/Fastpix/models/delete_mediaop.py +36 -0
  83. fastpix_python-1.0.0/src/Fastpix/models/delete_playbackid_of_streamop.py +30 -0
  84. fastpix_python-1.0.0/src/Fastpix/models/delete_signing_keyop.py +21 -0
  85. fastpix_python-1.0.0/src/Fastpix/models/delete_simulcast_of_streamop.py +30 -0
  86. fastpix_python-1.0.0/src/Fastpix/models/deletesigningkeyresponse.py +16 -0
  87. fastpix_python-1.0.0/src/Fastpix/models/direct_upload_video_mediaop.py +309 -0
  88. fastpix_python-1.0.0/src/Fastpix/models/directupload.py +56 -0
  89. fastpix_python-1.0.0/src/Fastpix/models/directuploadresponse.py +23 -0
  90. fastpix_python-1.0.0/src/Fastpix/models/disable_live_streamop.py +21 -0
  91. fastpix_python-1.0.0/src/Fastpix/models/domainrestrictions.py +34 -0
  92. fastpix_python-1.0.0/src/Fastpix/models/drmidresponse.py +16 -0
  93. fastpix_python-1.0.0/src/Fastpix/models/duplicatemp4support_error.py +34 -0
  94. fastpix_python-1.0.0/src/Fastpix/models/duplicatereferenceiderrorresponse.py +34 -0
  95. fastpix_python-1.0.0/src/Fastpix/models/enable_live_streamop.py +21 -0
  96. fastpix_python-1.0.0/src/Fastpix/models/errordetails.py +119 -0
  97. fastpix_python-1.0.0/src/Fastpix/models/fielderror.py +20 -0
  98. fastpix_python-1.0.0/src/Fastpix/models/forbidden_error.py +34 -0
  99. fastpix_python-1.0.0/src/Fastpix/models/forbiddenresponse_error.py +25 -0
  100. fastpix_python-1.0.0/src/Fastpix/models/generate_subtitle_trackop.py +61 -0
  101. fastpix_python-1.0.0/src/Fastpix/models/generatetrackresponse.py +116 -0
  102. fastpix_python-1.0.0/src/Fastpix/models/get_all_playlistsop.py +28 -0
  103. fastpix_python-1.0.0/src/Fastpix/models/get_all_streamsop.py +45 -0
  104. fastpix_python-1.0.0/src/Fastpix/models/get_data_viewlist_current_views_filterop.py +112 -0
  105. fastpix_python-1.0.0/src/Fastpix/models/get_data_viewlist_current_views_gettimeseriesviewsop.py +95 -0
  106. fastpix_python-1.0.0/src/Fastpix/models/get_live_stream_by_idop.py +21 -0
  107. fastpix_python-1.0.0/src/Fastpix/models/get_live_stream_playback_idop.py +30 -0
  108. fastpix_python-1.0.0/src/Fastpix/models/get_live_stream_viewer_count_by_idop.py +21 -0
  109. fastpix_python-1.0.0/src/Fastpix/models/get_media_clipsop.py +48 -0
  110. fastpix_python-1.0.0/src/Fastpix/models/get_mediaop.py +40 -0
  111. fastpix_python-1.0.0/src/Fastpix/models/get_playback_idop.py +62 -0
  112. fastpix_python-1.0.0/src/Fastpix/models/get_playlist_by_idop.py +21 -0
  113. fastpix_python-1.0.0/src/Fastpix/models/get_signing_key_by_idop.py +21 -0
  114. fastpix_python-1.0.0/src/Fastpix/models/get_specific_simulcast_of_streamop.py +30 -0
  115. fastpix_python-1.0.0/src/Fastpix/models/get_timeseries_dataop.py +203 -0
  116. fastpix_python-1.0.0/src/Fastpix/models/get_video_view_detailsop.py +42 -0
  117. fastpix_python-1.0.0/src/Fastpix/models/getallplaylistsresponse.py +24 -0
  118. fastpix_python-1.0.0/src/Fastpix/models/getallsigningkeyresponse.py +25 -0
  119. fastpix_python-1.0.0/src/Fastpix/models/getallsigningkeyresponsedto.py +38 -0
  120. fastpix_python-1.0.0/src/Fastpix/models/getcreatelivestreamresponsedto.py +111 -0
  121. fastpix_python-1.0.0/src/Fastpix/models/getdrmconfigurationbyidop.py +38 -0
  122. fastpix_python-1.0.0/src/Fastpix/models/getdrmconfigurationop.py +50 -0
  123. fastpix_python-1.0.0/src/Fastpix/models/getpublicpemusingsigningkeyidresponsedto.py +50 -0
  124. fastpix_python-1.0.0/src/Fastpix/models/getstreamsresponse.py +35 -0
  125. fastpix_python-1.0.0/src/Fastpix/models/invalidpermission_error.py +34 -0
  126. fastpix_python-1.0.0/src/Fastpix/models/invalidplaylistidresponse_error.py +31 -0
  127. fastpix_python-1.0.0/src/Fastpix/models/languagecode.py +70 -0
  128. fastpix_python-1.0.0/src/Fastpix/models/list_breakdown_valuesop.py +229 -0
  129. fastpix_python-1.0.0/src/Fastpix/models/list_by_top_contentop.py +89 -0
  130. fastpix_python-1.0.0/src/Fastpix/models/list_comparison_valuesop.py +182 -0
  131. fastpix_python-1.0.0/src/Fastpix/models/list_dimensionsop.py +25 -0
  132. fastpix_python-1.0.0/src/Fastpix/models/list_errorsop.py +117 -0
  133. fastpix_python-1.0.0/src/Fastpix/models/list_filter_values_for_dimensionop.py +161 -0
  134. fastpix_python-1.0.0/src/Fastpix/models/list_live_clipsop.py +74 -0
  135. fastpix_python-1.0.0/src/Fastpix/models/list_mediaop.py +65 -0
  136. fastpix_python-1.0.0/src/Fastpix/models/list_overall_valuesop.py +157 -0
  137. fastpix_python-1.0.0/src/Fastpix/models/list_signing_keysop.py +28 -0
  138. fastpix_python-1.0.0/src/Fastpix/models/list_uploadsop.py +65 -0
  139. fastpix_python-1.0.0/src/Fastpix/models/list_video_viewsop.py +222 -0
  140. fastpix_python-1.0.0/src/Fastpix/models/livenotfounderror.py +34 -0
  141. fastpix_python-1.0.0/src/Fastpix/models/livestreamdeleteresponse.py +16 -0
  142. fastpix_python-1.0.0/src/Fastpix/models/livestreamgetresponse.py +29 -0
  143. fastpix_python-1.0.0/src/Fastpix/models/livestreampagination.py +33 -0
  144. fastpix_python-1.0.0/src/Fastpix/models/livestreamresponsedto.py +29 -0
  145. fastpix_python-1.0.0/src/Fastpix/models/media.py +136 -0
  146. fastpix_python-1.0.0/src/Fastpix/models/mediacancelresponse.py +63 -0
  147. fastpix_python-1.0.0/src/Fastpix/models/mediaclipnotfound_error.py +34 -0
  148. fastpix_python-1.0.0/src/Fastpix/models/mediaclipresponse.py +303 -0
  149. fastpix_python-1.0.0/src/Fastpix/models/mediaidsrequest.py +19 -0
  150. fastpix_python-1.0.0/src/Fastpix/models/medianotfound_error.py +34 -0
  151. fastpix_python-1.0.0/src/Fastpix/models/mediaorplaybacknotfound_error.py +34 -0
  152. fastpix_python-1.0.0/src/Fastpix/models/mediatype.py +12 -0
  153. fastpix_python-1.0.0/src/Fastpix/models/metricsbreakdowndetails.py +96 -0
  154. fastpix_python-1.0.0/src/Fastpix/models/metricscomparisondetails.py +72 -0
  155. fastpix_python-1.0.0/src/Fastpix/models/metricsoveralldatadetails.py +127 -0
  156. fastpix_python-1.0.0/src/Fastpix/models/metricsoverallmetadatadetails.py +20 -0
  157. fastpix_python-1.0.0/src/Fastpix/models/metricstimeseriesdatadetails.py +83 -0
  158. fastpix_python-1.0.0/src/Fastpix/models/metricstimeseriesmetadatadetails.py +25 -0
  159. fastpix_python-1.0.0/src/Fastpix/models/moderationresponse.py +20 -0
  160. fastpix_python-1.0.0/src/Fastpix/models/namedentitiesresponse.py +20 -0
  161. fastpix_python-1.0.0/src/Fastpix/models/notfounderror.py +20 -0
  162. fastpix_python-1.0.0/src/Fastpix/models/notfounderrorplaybackid.py +34 -0
  163. fastpix_python-1.0.0/src/Fastpix/models/notfounderrorsimulcast.py +34 -0
  164. fastpix_python-1.0.0/src/Fastpix/models/pagination.py +33 -0
  165. fastpix_python-1.0.0/src/Fastpix/models/patchlivestreamrequest.py +24 -0
  166. fastpix_python-1.0.0/src/Fastpix/models/patchresponsedata.py +97 -0
  167. fastpix_python-1.0.0/src/Fastpix/models/patchresponsedto.py +26 -0
  168. fastpix_python-1.0.0/src/Fastpix/models/playbackid.py +111 -0
  169. fastpix_python-1.0.0/src/Fastpix/models/playbackidrequest.py +20 -0
  170. fastpix_python-1.0.0/src/Fastpix/models/playbackidresponse.py +26 -0
  171. fastpix_python-1.0.0/src/Fastpix/models/playbackidsuccessresponse.py +39 -0
  172. fastpix_python-1.0.0/src/Fastpix/models/playbacksettings.py +24 -0
  173. fastpix_python-1.0.0/src/Fastpix/models/playlistbyidresponse.py +118 -0
  174. fastpix_python-1.0.0/src/Fastpix/models/playlistcreatedresponse.py +26 -0
  175. fastpix_python-1.0.0/src/Fastpix/models/playlistcreatedschema.py +149 -0
  176. fastpix_python-1.0.0/src/Fastpix/models/playlistitem.py +37 -0
  177. fastpix_python-1.0.0/src/Fastpix/models/playlistorder.py +11 -0
  178. fastpix_python-1.0.0/src/Fastpix/models/policyaction.py +11 -0
  179. fastpix_python-1.0.0/src/Fastpix/models/retrievemediainputinfoop.py +49 -0
  180. fastpix_python-1.0.0/src/Fastpix/models/security.py +32 -0
  181. fastpix_python-1.0.0/src/Fastpix/models/signingkeynotfounderror.py +25 -0
  182. fastpix_python-1.0.0/src/Fastpix/models/signingkeyworkspacedto.py +29 -0
  183. fastpix_python-1.0.0/src/Fastpix/models/simulcastdeleteresponse.py +16 -0
  184. fastpix_python-1.0.0/src/Fastpix/models/simulcastrequest.py +27 -0
  185. fastpix_python-1.0.0/src/Fastpix/models/simulcastresponse.py +60 -0
  186. fastpix_python-1.0.0/src/Fastpix/models/simulcastunavailable_error.py +42 -0
  187. fastpix_python-1.0.0/src/Fastpix/models/simulcastupdaterequest.py +22 -0
  188. fastpix_python-1.0.0/src/Fastpix/models/simulcastupdateresponse.py +60 -0
  189. fastpix_python-1.0.0/src/Fastpix/models/singingkeyspagination.py +33 -0
  190. fastpix_python-1.0.0/src/Fastpix/models/sortorder.py +11 -0
  191. fastpix_python-1.0.0/src/Fastpix/models/srtplaybackresponse.py +30 -0
  192. fastpix_python-1.0.0/src/Fastpix/models/streamalreadydisablederror.py +34 -0
  193. fastpix_python-1.0.0/src/Fastpix/models/streamalreadyenablederror.py +34 -0
  194. fastpix_python-1.0.0/src/Fastpix/models/subtitleinput.py +40 -0
  195. fastpix_python-1.0.0/src/Fastpix/models/successresponse.py +29 -0
  196. fastpix_python-1.0.0/src/Fastpix/models/summaryresponse.py +20 -0
  197. fastpix_python-1.0.0/src/Fastpix/models/toperrordetails.py +145 -0
  198. fastpix_python-1.0.0/src/Fastpix/models/track.py +48 -0
  199. fastpix_python-1.0.0/src/Fastpix/models/trackduplicaterequest_error.py +34 -0
  200. fastpix_python-1.0.0/src/Fastpix/models/tracksubtitlesgeneraterequest.py +32 -0
  201. fastpix_python-1.0.0/src/Fastpix/models/trialplanrestrictionerror.py +34 -0
  202. fastpix_python-1.0.0/src/Fastpix/models/unauthorized_error.py +34 -0
  203. fastpix_python-1.0.0/src/Fastpix/models/unauthorizedresponse_error.py +25 -0
  204. fastpix_python-1.0.0/src/Fastpix/models/update_a_playlistop.py +28 -0
  205. fastpix_python-1.0.0/src/Fastpix/models/update_live_streamop.py +31 -0
  206. fastpix_python-1.0.0/src/Fastpix/models/update_media_chaptersop.py +64 -0
  207. fastpix_python-1.0.0/src/Fastpix/models/update_media_moderationop.py +69 -0
  208. fastpix_python-1.0.0/src/Fastpix/models/update_media_named_entitiesop.py +64 -0
  209. fastpix_python-1.0.0/src/Fastpix/models/update_media_summaryop.py +77 -0
  210. fastpix_python-1.0.0/src/Fastpix/models/update_media_trackop.py +58 -0
  211. fastpix_python-1.0.0/src/Fastpix/models/update_specific_simulcast_of_streamop.py +40 -0
  212. fastpix_python-1.0.0/src/Fastpix/models/updated_mediaop.py +54 -0
  213. fastpix_python-1.0.0/src/Fastpix/models/updated_mp4supportop.py +71 -0
  214. fastpix_python-1.0.0/src/Fastpix/models/updated_source_accessop.py +62 -0
  215. fastpix_python-1.0.0/src/Fastpix/models/updateplaylistrequest.py +20 -0
  216. fastpix_python-1.0.0/src/Fastpix/models/updatetrackrequest.py +31 -0
  217. fastpix_python-1.0.0/src/Fastpix/models/updatetrackresponse.py +48 -0
  218. fastpix_python-1.0.0/src/Fastpix/models/useragentrestrictions.py +34 -0
  219. fastpix_python-1.0.0/src/Fastpix/models/videoinput.py +120 -0
  220. fastpix_python-1.0.0/src/Fastpix/models/viewnotfound_error.py +25 -0
  221. fastpix_python-1.0.0/src/Fastpix/models/views.py +1642 -0
  222. fastpix_python-1.0.0/src/Fastpix/models/viewsbytopcontentdetails.py +31 -0
  223. fastpix_python-1.0.0/src/Fastpix/models/viewscountresponse.py +35 -0
  224. fastpix_python-1.0.0/src/Fastpix/models/viewslist.py +182 -0
  225. fastpix_python-1.0.0/src/Fastpix/models/watermarkinput.py +85 -0
  226. fastpix_python-1.0.0/src/Fastpix/playback.py +823 -0
  227. fastpix_python-1.0.0/src/Fastpix/playlist.py +1985 -0
  228. fastpix_python-1.0.0/src/Fastpix/py.typed +1 -0
  229. fastpix_python-1.0.0/src/Fastpix/sdk.py +248 -0
  230. fastpix_python-1.0.0/src/Fastpix/sdkconfiguration.py +49 -0
  231. fastpix_python-1.0.0/src/Fastpix/signing_keys.py +1097 -0
  232. fastpix_python-1.0.0/src/Fastpix/simulcast_stream.py +1041 -0
  233. fastpix_python-1.0.0/src/Fastpix/start_live_stream.py +289 -0
  234. fastpix_python-1.0.0/src/Fastpix/types/__init__.py +21 -0
  235. fastpix_python-1.0.0/src/Fastpix/types/basemodel.py +39 -0
  236. fastpix_python-1.0.0/src/Fastpix/utils/__init__.py +200 -0
  237. fastpix_python-1.0.0/src/Fastpix/utils/annotations.py +79 -0
  238. fastpix_python-1.0.0/src/Fastpix/utils/datetimes.py +23 -0
  239. fastpix_python-1.0.0/src/Fastpix/utils/enums.py +74 -0
  240. fastpix_python-1.0.0/src/Fastpix/utils/eventstreaming.py +248 -0
  241. fastpix_python-1.0.0/src/Fastpix/utils/forms.py +223 -0
  242. fastpix_python-1.0.0/src/Fastpix/utils/headers.py +136 -0
  243. fastpix_python-1.0.0/src/Fastpix/utils/logger.py +27 -0
  244. fastpix_python-1.0.0/src/Fastpix/utils/metadata.py +118 -0
  245. fastpix_python-1.0.0/src/Fastpix/utils/queryparams.py +205 -0
  246. fastpix_python-1.0.0/src/Fastpix/utils/requestbodies.py +66 -0
  247. fastpix_python-1.0.0/src/Fastpix/utils/retries.py +217 -0
  248. fastpix_python-1.0.0/src/Fastpix/utils/security.py +195 -0
  249. fastpix_python-1.0.0/src/Fastpix/utils/serializers.py +249 -0
  250. fastpix_python-1.0.0/src/Fastpix/utils/unmarshal_json_response.py +24 -0
  251. fastpix_python-1.0.0/src/Fastpix/utils/url.py +155 -0
  252. fastpix_python-1.0.0/src/Fastpix/utils/values.py +140 -0
  253. fastpix_python-1.0.0/src/Fastpix/views_sdk.py +1297 -0
  254. fastpix_python-1.0.0/src/fastpix_python.egg-info/PKG-INFO +768 -0
  255. fastpix_python-1.0.0/src/fastpix_python.egg-info/SOURCES.txt +259 -0
  256. fastpix_python-1.0.0/src/fastpix_python.egg-info/requires.txt +3 -0
  257. fastpix_python-1.0.0/src/fastpix_python.egg-info/top_level.txt +1 -0
  258. fastpix_python-1.0.0/tests/test_fastpix_sdk.py +188 -0
  259. fastpix_python-0.1.7/PKG-INFO +0 -507
  260. fastpix_python-0.1.7/README.md +0 -471
  261. fastpix_python-0.1.7/fastpix/__init__.py +0 -4
  262. fastpix_python-0.1.7/fastpix/async_client/__init__.py +0 -3
  263. fastpix_python-0.1.7/fastpix/async_client/api.py +0 -33
  264. fastpix_python-0.1.7/fastpix/async_client/client.py +0 -52
  265. fastpix_python-0.1.7/fastpix/async_client/live_streams.py +0 -147
  266. fastpix_python-0.1.7/fastpix/async_client/media.py +0 -121
  267. fastpix_python-0.1.7/fastpix/async_client/playback_ids.py +0 -79
  268. fastpix_python-0.1.7/fastpix/client/__init__.py +0 -3
  269. fastpix_python-0.1.7/fastpix/client/api.py +0 -28
  270. fastpix_python-0.1.7/fastpix/client/client.py +0 -63
  271. fastpix_python-0.1.7/fastpix/client/live_streams.py +0 -150
  272. fastpix_python-0.1.7/fastpix/client/media.py +0 -110
  273. fastpix_python-0.1.7/fastpix/client/playback_ids.py +0 -80
  274. fastpix_python-0.1.7/fastpix/utilis/__init__.py +0 -4
  275. fastpix_python-0.1.7/fastpix/utilis/constants.py +0 -33
  276. fastpix_python-0.1.7/fastpix/utilis/exceptions.py +0 -14
  277. fastpix_python-0.1.7/fastpix/utilis/utilis.py +0 -17
  278. fastpix_python-0.1.7/fastpix_python.egg-info/PKG-INFO +0 -507
  279. fastpix_python-0.1.7/fastpix_python.egg-info/SOURCES.txt +0 -25
  280. fastpix_python-0.1.7/fastpix_python.egg-info/requires.txt +0 -4
  281. fastpix_python-0.1.7/fastpix_python.egg-info/top_level.txt +0 -1
  282. {fastpix_python-0.1.7 → fastpix_python-1.0.0}/LICENSE +0 -0
  283. {fastpix_python-0.1.7 → fastpix_python-1.0.0}/setup.cfg +0 -0
  284. {fastpix_python-0.1.7 → fastpix_python-1.0.0/src}/fastpix_python.egg-info/dependency_links.txt +0 -0
@@ -0,0 +1,768 @@
1
+ Metadata-Version: 2.4
2
+ Name: fastpix_python
3
+ Version: 1.0.0
4
+ Summary: Python Client SDK Generated by fastpix.
5
+ Home-page: https://github.com/FastPix/fastpix-python
6
+ Author: fastpix
7
+ Author-email: dev@fastpix.io
8
+ Requires-Python: >=3.7
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: httpcore>=1.0.9
12
+ Requires-Dist: httpx>=0.28.1
13
+ Requires-Dist: pydantic>=2.11.2
14
+ Dynamic: author-email
15
+ Dynamic: home-page
16
+ Dynamic: license-file
17
+ Dynamic: requires-python
18
+
19
+ # Python SDK
20
+
21
+ Developer‑friendly and type‑safe Python SDK specifically catered to leverage *fastpix_python* API.
22
+
23
+ <!-- Start Summary [summary] -->
24
+
25
+ ## Introduction
26
+
27
+ The FastPix Python SDK simplifies integration with the FastPix platform. It provides a clean, Pythonic interface for secure and efficient communication with the FastPix API, enabling easy management of media uploads, live streaming, on‑demand content, playlists, video analytics, and signing keys for secure access and token management. It is intended for use with Python 3.8 and above.
28
+
29
+
30
+ ## Prerequisites
31
+
32
+ ### Environment and Version Support
33
+
34
+ <table>
35
+ <tr>
36
+ <th>Requirement</th>
37
+ <th>Version</th>
38
+ <th>Description</th>
39
+ </tr>
40
+ <tr>
41
+ <td><strong>Python</strong></td>
42
+ <td><code>3.8+</code></td>
43
+ <td>Core runtime environment</td>
44
+ </tr>
45
+ <tr>
46
+ <td><strong>pip</strong></td>
47
+ <td><code>Latest</code></td>
48
+ <td>Package manager for dependencies</td>
49
+ </tr>
50
+ <tr>
51
+ <td><strong>Internet</strong></td>
52
+ <td><code>Required</code></td>
53
+ <td>API communication and authentication</td>
54
+ </tr>
55
+ </table>
56
+
57
+ > **Pro Tip:** We recommend using Python 3.9+ for optimal performance and the latest language features.
58
+
59
+ ### Getting Started with FastPix
60
+
61
+ To get started with the **FastPix Python SDK**, ensure you have the following:
62
+
63
+ - The FastPix APIs are authenticated using an **Access Token** and a **Secret Key**. You must generate these credentials to use the SDK.
64
+
65
+ - Follow the steps in the [Authentication with Access Tokens](https://docs.fastpix.io/docs/basic-authentication) guide to obtain your credentials.
66
+
67
+ ### Environment Variables (Optional)
68
+
69
+ Configure your FastPix credentials using environment variables for enhanced security and convenience:
70
+
71
+ ```bash
72
+ # Set your FastPix credentials
73
+ export FASTPIX_ACCESS_TOKEN="your_access_token_here"
74
+ export FASTPIX_SECRET_KEY="your_secret_key_here"
75
+
76
+ # Or add to your .env file
77
+ echo "FASTPIX_ACCESS_TOKEN=your_access_token_here" >> .env
78
+ echo "FASTPIX_SECRET_KEY=your_secret_key_here" >> .env
79
+ ```
80
+
81
+ > **Security Note:** Never commit your credentials to version control. Use environment variables or secure credential management systems.
82
+
83
+
84
+
85
+
86
+ <!-- End Summary [summary] -->
87
+
88
+ <!-- Start Table of Contents [toc] -->
89
+ ## Table of Contents
90
+ <!-- $toc-max-depth=2 -->
91
+ * [Fastpix_Python](#fastpixpython)
92
+ * [Setup](#setup)
93
+ * [Example Usage](#example-usage)
94
+ * [Available Resources and Operations](#available-resources-and-operations)
95
+ * [Retries](#retries)
96
+ * [Error Handling](#error-handling)
97
+ * [Server Selection](#server-selection)
98
+ * [Custom HTTP Client](#custom-http-client)
99
+ * [Resource Management](#resource-management)
100
+ * [Debugging](#debugging)
101
+ * [Development](#development)
102
+
103
+
104
+ <!-- End Table of Contents [toc] -->
105
+
106
+ <!-- Start Setup [setup] -->
107
+ ## Setup
108
+
109
+ ### Installation
110
+
111
+ Install the FastPix Python SDK using pip:
112
+
113
+ ```bash
114
+ pip install git+https://github.com/FastPix/fastpix-python
115
+ ```
116
+
117
+ Or if you're using a virtual environment:
118
+
119
+ ```bash
120
+ # Create virtual environment
121
+ python -m venv fastpix-env
122
+
123
+ # Activate virtual environment
124
+ # On Windows:
125
+ fastpix-env\Scripts\activate
126
+ # On macOS/Linux:
127
+ source fastpix-env/bin/activate
128
+
129
+ ### Imports
130
+
131
+ Import the necessary modules for your FastPix integration:
132
+
133
+ ```python
134
+ # Basic imports
135
+ from fastpix_python import Fastpix, models
136
+
137
+ # Specific API imports
138
+ from fastpix_python.manage_videos import ManageVideos
139
+ from fastpix_python.live_playback import LivePlayback
140
+ from fastpix_python.metrics import Metrics
141
+
142
+ # Error handling imports
143
+ from fastpix_python.errors import FastPixError, AuthenticationError
144
+ ```
145
+
146
+ ### Initialization
147
+
148
+ Initialize the FastPix SDK with your credentials:
149
+
150
+ ```python
151
+ from fastpix_python import Fastpix, models
152
+
153
+ # Initialize with credentials
154
+ with Fastpix(
155
+ security=models.Security(
156
+ username="your-access-token",
157
+ password="your-secret-key",
158
+ ),
159
+ ) as fastpix:
160
+ # Your API calls here
161
+ pass
162
+ ```
163
+
164
+ Or using environment variables:
165
+
166
+ ```python
167
+ import os
168
+ from fastpix_python import Fastpix, models
169
+
170
+ # Initialize with environment variables
171
+ with Fastpix(
172
+ security=models.Security(
173
+ username=os.getenv("FASTPIX_ACCESS_TOKEN"),
174
+ password=os.getenv("FASTPIX_SECRET_KEY"),
175
+ ),
176
+ ) as fastpix:
177
+ # Your API calls here
178
+ pass
179
+ ```
180
+
181
+
182
+
183
+ <!-- End Setup [setup] -->
184
+
185
+ <!-- Start Example Usage [example-usage] -->
186
+ ## Example Usage
187
+
188
+ ### Example
189
+
190
+ ```python
191
+ # Synchronous Example
192
+ from fastpix_python import Fastpix, models
193
+
194
+
195
+ with Fastpix(
196
+ security=models.Security(
197
+ username = "your-access-token",
198
+ password = "secret-key",
199
+ ),
200
+ ) as fastpix:
201
+
202
+ res = fastpix.input_video.create_media(inputs=[
203
+ {
204
+ "type": "video",
205
+ "url": "https://static.fastpix.io/sample.mp4",
206
+ },
207
+ ], access_policy="public", metadata={
208
+ "key1": "value1",
209
+ }, subtitles={
210
+ "language_name": "english",
211
+ "metadata": {
212
+ "key1": "value1",
213
+ },
214
+ "language_code": "en",
215
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
216
+ "generate": True,
217
+ }, chapters=True, named_entities=True)
218
+
219
+ # Handle response
220
+ print(res)
221
+ ```
222
+
223
+ </br>
224
+
225
+ The same SDK client can also be used to make asynchronous requests by importing asyncio.
226
+
227
+ ```python
228
+ # Asynchronous Example
229
+ import asyncio
230
+ from fastpix_python import Fastpix, models
231
+
232
+ async def main():
233
+
234
+ async with Fastpix(
235
+ security=models.Security(
236
+ username = "your-access-token",
237
+ password = "secret-key",
238
+ ),
239
+ ) as fastpix:
240
+
241
+ res = await fastpix.input_video.create_media_async(inputs=[
242
+ {
243
+ "type": "video",
244
+ "url": "https://static.fastpix.io/sample.mp4",
245
+ },
246
+ ], access_policy="public", metadata={
247
+ "key1": "value1",
248
+ }, subtitles={
249
+ "language_name": "english",
250
+ "metadata": {
251
+ "key1": "value1",
252
+ },
253
+ "language_code": "en",
254
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
255
+ "generate": True,
256
+ }, chapters=True, named_entities=True)
257
+
258
+ # Handle response
259
+ print(res)
260
+
261
+ asyncio.run(main())
262
+ ```
263
+ <!-- End Example Usage [example-usage] -->
264
+
265
+
266
+
267
+ <!-- Start API Reference [api-reference] -->
268
+ ## Available Resources and Operations
269
+
270
+ single line description here
271
+
272
+ ### Media API
273
+
274
+ Upload, manage, and transform video content with comprehensive media management capabilities.
275
+
276
+ For detailed documentation, see [FastPix Video on Demand Overview](https://docs.fastpix.io/docs/video-on-demand-overview).
277
+
278
+ #### Input Video
279
+ - [Create from URL](docs/sdks/inputvideo/README.md#create_media) - Upload video content from external URL
280
+ - [Upload from Device](docs/sdks/inputvideo/README.md#direct_upload_video_media) - Upload video files directly from device
281
+
282
+ #### Manage Videos
283
+ - [List All Media](docs/sdks/managevideos/README.md#list_media) - Retrieve complete list of all media files
284
+ - [Get Media by ID](docs/sdks/managevideos/README.md#get_media) - Get detailed information for specific media
285
+ - [Update Media](docs/sdks/managevideos/README.md#updated_media) - Modify media metadata and settings
286
+ - [Delete Media](docs/sdks/managevideos/README.md#delete_media) - Remove media files from library
287
+ - [Add Track](docs/sdks/managevideos/README.md#add_media_track) - Add audio or subtitle tracks to media
288
+ - [Cancel Upload](docs/sdks/managevideos/README.md#cancel_upload) - Stop ongoing media upload process
289
+ - [Update Track](docs/sdks/managevideos/README.md#update_media_track) - Modify existing audio or subtitle tracks
290
+ - [Delete Track](docs/sdks/managevideos/README.md#delete_media_track) - Remove audio or subtitle tracks
291
+ - [Generate Subtitles](docs/sdks/managevideos/README.md#generate_subtitle_track) - Create automatic subtitles for media
292
+ - [Update Source Access](docs/sdks/managevideos/README.md#updated_source_access) - Control access permissions for media source
293
+ - [Update MP4 Support](docs/sdks/managevideos/README.md#updated_mp4_support) - Configure MP4 download capabilities
294
+ - [Get Input Info](docs/sdks/managevideos/README.md#retrieve_media_input_info) - Retrieve detailed input information
295
+ - [List Uploads](docs/sdks/managevideos/README.md#list_uploads) - Get all available upload URLs
296
+ - [Get Media Clips](docs/sdks/managevideos/README.md#get_media_clips) - Retrieve all video clips for media
297
+
298
+ #### Playback
299
+ - [Create Playback ID](docs/sdks/playback/README.md#create_media_playback_id) - Generate secure playback identifier
300
+ - [Delete Playback ID](docs/sdks/playback/README.md#delete_media_playback_id) - Remove playback access
301
+ - [Get Playback ID](docs/sdks/playback/README.md#get_playback_id) - Retrieve playback configuration details
302
+
303
+ #### Playlist
304
+ - [Create Playlist](docs/sdks/playlist/README.md#create_a_playlist) - Create new video playlist
305
+ - [List Playlists](docs/sdks/playlist/README.md#get_all_playlists) - Get all available playlists
306
+ - [Get Playlist](docs/sdks/playlist/README.md#get_playlist_by_id) - Retrieve specific playlist details
307
+ - [Update Playlist](docs/sdks/playlist/README.md#update_a_playlist) - Modify playlist settings and metadata
308
+ - [Delete Playlist](docs/sdks/playlist/README.md#delete_a_playlist) - Remove playlist from library
309
+ - [Add Media](docs/sdks/playlist/README.md#add_media_to_playlist) - Add media items to playlist
310
+ - [Reorder Media](docs/sdks/playlist/README.md#change_media_order_in_playlist) - Change order of media in playlist
311
+ - [Remove Media](docs/sdks/playlist/README.md#delete_media_from_playlist) - Remove media from playlist
312
+
313
+ #### Signing Keys
314
+ - [Create Key](docs/sdks/signingkeys/README.md#create_signing_key) - Generate new signing key pair
315
+ - [List Keys](docs/sdks/signingkeys/README.md#list_signing_keys) - Get all available signing keys
316
+ - [Delete Key](docs/sdks/signingkeys/README.md#delete_signing_key) - Remove signing key from system
317
+ - [Get Key](docs/sdks/signingkeys/README.md#get_signing_key_by_id) - Retrieve specific signing key details
318
+
319
+ #### DRM Configurations
320
+ - [List DRM Configs](docs/sdks/drmconfigurations/README.md#get_drm_configuration) - Get all DRM configuration options
321
+ - [Get DRM Config](docs/sdks/drmconfigurations/README.md#get_drm_configuration_by_id) - Retrieve specific DRM configuration
322
+
323
+ ### Live API
324
+
325
+ Stream, manage, and transform live video content with real-time broadcasting capabilities.
326
+
327
+ For detailed documentation, see [FastPix Live Stream Overview](https://docs.fastpix.io/docs/live-stream-overview).
328
+
329
+ #### Start Live Stream
330
+ - [Create Stream](docs/sdks/startlivestream/README.md#create_new_stream) - Initialize new live streaming session
331
+
332
+ #### Manage Live Stream
333
+ - [List Streams](docs/sdks/managelivestream/README.md#get_all_streams) - Retrieve all active live streams
334
+ - [Get Viewer Count](docs/sdks/managelivestream/README.md#get_live_stream_viewer_count_by_id) - Get real-time viewer statistics
335
+ - [Get Stream](docs/sdks/managelivestream/README.md#get_live_stream_by_id) - Retrieve detailed stream information
336
+ - [Delete Stream](docs/sdks/managelivestream/README.md#delete_live_stream) - Terminate and remove live stream
337
+ - [Update Stream](docs/sdks/managelivestream/README.md#update_live_stream) - Modify stream settings and configuration
338
+ - [Enable Stream](docs/sdks/managelivestream/README.md#enable_live_stream) - Activate live streaming
339
+ - [Disable Stream](docs/sdks/managelivestream/README.md#disable_live_stream) - Pause live streaming
340
+ - [Complete Stream](docs/sdks/managelivestream/README.md#complete_live_stream) - Finalize and archive stream
341
+
342
+ #### Live Playback
343
+ - [Create Playback ID](docs/sdks/liveplayback/README.md#create_playback_id_of_stream) - Generate secure live playback access
344
+ - [Delete Playback ID](docs/sdks/liveplayback/README.md#delete_playback_id_of_stream) - Revoke live playback access
345
+ - [Get Playback ID](docs/sdks/liveplayback/README.md#get_live_stream_playback_id) - Retrieve live playback configuration
346
+
347
+ #### Simulcast Stream
348
+ - [Create Simulcast](docs/sdks/simulcaststream/README.md#create_simulcast_of_stream) - Set up multi-platform streaming
349
+ - [Delete Simulcast](docs/sdks/simulcaststream/README.md#delete_simulcast_of_stream) - Remove simulcast configuration
350
+ - [Get Simulcast](docs/sdks/simulcaststream/README.md#get_specific_simulcast_of_stream) - Retrieve simulcast settings
351
+ - [Update Simulcast](docs/sdks/simulcaststream/README.md#update_specific_simulcast_of_stream) - Modify simulcast parameters
352
+
353
+ ### Video Data API - [Reference](https://docs.fastpix.io/docs/video-data-overview)
354
+
355
+ Monitor video performance and quality with comprehensive analytics and real-time metrics.
356
+
357
+ For detailed documentation, see [FastPix Video Data Overview](https://docs.fastpix.io/docs/video-data-overview).
358
+
359
+ #### Metrics
360
+ - [List Breakdown Values](docs/sdks/metrics/README.md#list_breakdown_values) - Get detailed breakdown of metrics by dimension
361
+ - [List Overall Values](docs/sdks/metrics/README.md#list_overall_values) - Get aggregated metric values across all content
362
+ - [Get Timeseries Data](docs/sdks/metrics/README.md#get_timeseries_data) - Retrieve time-based metric trends and patterns
363
+ - [List Comparison Values](docs/sdks/metrics/README.md#list_comparison_values) - Compare metrics across different time periods
364
+
365
+ #### Views
366
+ - [List Video Views](docs/sdks/viewssdk/README.md#list_video_views) - Get comprehensive list of video viewing sessions
367
+ - [Get View Details](docs/sdks/viewssdk/README.md#get_video_view_details) - Retrieve detailed information about specific video views
368
+ - [List Top Content](docs/sdks/viewssdk/README.md#list_by_top_content) - Find your most popular and engaging content
369
+ - [Get Concurrent Viewers](docs/sdks/viewssdk/README.md#get_data_viewlist_current_views_get_timeseries_views) - Monitor real-time viewer counts over time
370
+ - [Get Viewer Breakdown](docs/sdks/viewssdk/README.md#get_data_viewlist_current_views_filter) - Analyze viewers by device, location, and other dimensions
371
+
372
+ #### Dimensions
373
+ - [List Dimensions](docs/sdks/dimensions/README.md#list_dimensions) - Get available data dimensions for filtering and analysis
374
+ - [List Filter Values](docs/sdks/dimensions/README.md#list_filter_values_for_dimension) - Get specific values for a particular dimension
375
+
376
+
377
+
378
+ ### In-Video AI Features - [Reference](https://docs.fastpix.io/docs/using-nsfw-and-profanity-filter-for-video-moderation)
379
+
380
+ Enhance video content with AI-powered features including moderation, summarization, and intelligent categorization.
381
+
382
+ For detailed documentation, see [Video Moderation Guide](https://docs.fastpix.io/docs/using-nsfw-and-profanity-filter-for-video-moderation).
383
+
384
+ - [Generate Summary](docs/sdks/invideoaifeatures/README.md#update_media_summary) - Create AI-generated video summaries
385
+ - [Create Chapters](docs/sdks/invideoaifeatures/README.md#update_media_chapters) - Automatically generate video chapter markers
386
+ - [Extract Entities](docs/sdks/invideoaifeatures/README.md#update_media_named_entities) - Identify and extract named entities from content
387
+ - [Enable Moderation](docs/sdks/invideoaifeatures/README.md#update_media_moderation) - Activate content moderation and safety checks
388
+
389
+
390
+ ### Error Handling
391
+
392
+ Handle and manage errors with comprehensive error handling capabilities and detailed error information for all API operations.
393
+
394
+ - [List Errors](docs/sdks/errors/README.md#list_errors) - Retrieve comprehensive error logs and diagnostics
395
+
396
+ <!-- End API Reference [api-reference] -->
397
+
398
+ <!-- Start Retries [retries] -->
399
+ ## Retries
400
+
401
+ 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.
402
+
403
+ To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
404
+ ```python
405
+ from fastpix_python import Fastpix, models
406
+ from fastpix_python.utils import BackoffStrategy, RetryConfig
407
+
408
+
409
+ with Fastpix(
410
+ security=models.Security(
411
+ username = "your-access-token",
412
+ password = "secret-key",
413
+ ),
414
+ ) as fastpix:
415
+
416
+ res = fastpix.input_video.create_media(inputs=[
417
+ {
418
+ "type": "video",
419
+ "url": "https://static.fastpix.io/sample.mp4",
420
+ },
421
+ ], access_policy="public", metadata={
422
+ "key1": "value1",
423
+ }, subtitles={
424
+ "language_name": "english",
425
+ "metadata": {
426
+ "key1": "value1",
427
+ },
428
+ "language_code": "en",
429
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
430
+ "generate": True,
431
+ }, chapters=True, named_entities=True,
432
+ RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
433
+
434
+ # Handle response
435
+ print(res)
436
+
437
+ ```
438
+
439
+ 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:
440
+ ```python
441
+ from fastpix_python import Fastpix, models
442
+ from fastpix_python.utils import BackoffStrategy, RetryConfig
443
+
444
+
445
+ with Fastpix(
446
+ retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
447
+ security=models.Security(
448
+ username = "your-access-token",
449
+ password = "secret-key",
450
+ ),
451
+ ) as fastpix:
452
+
453
+ res = fastpix.input_video.create_media(inputs=[
454
+ {
455
+ "type": "video",
456
+ "url": "https://static.fastpix.io/sample.mp4",
457
+ },
458
+ ], access_policy="public", metadata={
459
+ "key1": "value1",
460
+ }, subtitles={
461
+ "language_name": "english",
462
+ "metadata": {
463
+ "key1": "value1",
464
+ },
465
+ "language_code": "en",
466
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
467
+ "generate": True,
468
+ }, chapters=True, named_entities=True)
469
+
470
+ # Handle response
471
+ print(res)
472
+
473
+ ```
474
+ <!-- End Retries [retries] -->
475
+
476
+ <!-- Start Error Handling [errors] -->
477
+ ## Error Handling
478
+
479
+ [`FastpixError`](./src/fastpix_python/errors/fastpixerror.py) is the base class for all HTTP error responses. It has the following properties:
480
+
481
+ | Property | Type | Description |
482
+ | ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
483
+ | `err.message` | `str` | Error message |
484
+ | `err.status_code` | `int` | HTTP response status code eg `404` |
485
+ | `err.headers` | `httpx.Headers` | HTTP response headers |
486
+ | `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
487
+ | `err.raw_response` | `httpx.Response` | Raw HTTP response |
488
+ | `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
489
+
490
+ ### Example
491
+ ```python
492
+ from fastpix_python import Fastpix, errors, models
493
+
494
+
495
+ with Fastpix(
496
+ security=models.Security(
497
+ username = "your-access-token",
498
+ password = "secret-key",
499
+ ),
500
+ ) as fastpix:
501
+ res = None
502
+ try:
503
+
504
+ res = fastpix.input_video.create_media(inputs=[
505
+ {
506
+ "type": "video",
507
+ "url": "https://static.fastpix.io/sample.mp4",
508
+ },
509
+ ], access_policy="public", metadata={
510
+ "key1": "value1",
511
+ }, subtitles={
512
+ "language_name": "english",
513
+ "metadata": {
514
+ "key1": "value1",
515
+ },
516
+ "language_code": "en",
517
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
518
+ "generate": True,
519
+ }, chapters=True, named_entities=True)
520
+
521
+ # Handle response
522
+ print(res)
523
+
524
+
525
+ except errors.FastpixError as e:
526
+ # The base class for HTTP error responses
527
+ print(e.message)
528
+ print(e.status_code)
529
+ print(e.body)
530
+ print(e.headers)
531
+ print(e.raw_response)
532
+
533
+ # Depending on the method different errors may be thrown
534
+ if isinstance(e, errors.BadRequestError):
535
+ print(e.data.success) # Optional[bool]
536
+ print(e.data.error) # Optional[models.BadRequestError]
537
+ ```
538
+
539
+ ### Error Classes
540
+ **Primary errors:**
541
+ * [`FastpixError`](./src/fastpix_python/errors/fastpixerror.py): The base class for HTTP error responses.
542
+ * [`InvalidPermissionError`](./src/fastpix_python/errors/invalidpermissionerror.py): *
543
+ * [`ValidationErrorResponse`](./src/fastpix_python/errors/validationerrorresponse.py): Status code `422`. *
544
+
545
+ <details><summary>Less common errors (27)</summary>
546
+
547
+ <br />
548
+
549
+ **Network errors:**
550
+ * [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
551
+ * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
552
+ * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
553
+
554
+
555
+ **Inherit from [`FastpixError`](./src/fastpix_python/errors/fastpixerror.py)**:
556
+ * [`ForbiddenError`](./src/fastpix_python/errors/forbiddenerror.py): Status code `403`. Applicable to 26 of 66 methods.*
557
+ * [`UnauthorizedError`](./src/fastpix_python/errors/unauthorizederror.py): Applicable to 24 of 66 methods.*
558
+ * [`MediaNotFoundError`](./src/fastpix_python/errors/medianotfounderror.py): Status code `404`. Applicable to 17 of 66 methods.*
559
+ * [`BadRequestError`](./src/fastpix_python/errors/badrequesterror.py): Bad Request. Status code `400`. Applicable to 10 of 66 methods.*
560
+ * [`NotFoundError`](./src/fastpix_python/errors/notfounderror.py): Status code `404`. Applicable to 8 of 66 methods.*
561
+ * [`ViewNotFoundError`](./src/fastpix_python/errors/viewnotfounderror.py): View Not Found. Status code `404`. Applicable to 7 of 66 methods.*
562
+ * [`LiveNotFoundError`](./src/fastpix_python/errors/livenotfounderror.py): Stream Not Found. Status code `404`. Applicable to 6 of 66 methods.*
563
+ * [`InvalidPlaylistIDResponseError`](./src/fastpix_python/errors/invalidplaylistidresponseerror.py): Payload Validation Failed. Status code `422`. Applicable to 6 of 66 methods.*
564
+ * [`UnAuthorizedResponseError`](./src/fastpix_python/errors/unauthorizedresponseerror.py): response for unauthorized request. Status code `401`. Applicable to 4 of 66 methods.*
565
+ * [`ForbiddenResponseError`](./src/fastpix_python/errors/forbiddenresponseerror.py): response for forbidden request. Status code `403`. Applicable to 4 of 66 methods.*
566
+ * [`TrackDuplicateRequestError`](./src/fastpix_python/errors/trackduplicaterequesterror.py): Duplicate language name. Status code `400`. Applicable to 3 of 66 methods.*
567
+ * [`NotFoundErrorSimulcast`](./src/fastpix_python/errors/notfounderrorsimulcast.py): Stream/Simulcast Not Found. Status code `404`. Applicable to 3 of 66 methods.*
568
+ * [`MediaOrPlaybackNotFoundError`](./src/fastpix_python/errors/mediaorplaybacknotfounderror.py): Status code `404`. Applicable to 2 of 66 methods.*
569
+ * [`NotFoundErrorPlaybackID`](./src/fastpix_python/errors/notfounderrorplaybackid.py): Status code `404`. Applicable to 2 of 66 methods.*
570
+ * [`SigningKeyNotFoundError`](./src/fastpix_python/errors/signingkeynotfounderror.py): Bad Request. Status code `404`. Applicable to 2 of 66 methods.*
571
+ * [`DuplicateMp4SupportError`](./src/fastpix_python/errors/duplicatemp4supporterror.py): Mp4Support value already exists. Status code `400`. Applicable to 1 of 66 methods.*
572
+ * [`TrialPlanRestrictionError`](./src/fastpix_python/errors/trialplanrestrictionerror.py): Bad Request – Stream is either already enabled or cannot be enabled on trial plan. Status code `400`. Applicable to 1 of 66 methods.*
573
+ * [`StreamAlreadyEnabledError`](./src/fastpix_python/errors/streamalreadyenablederror.py): Bad Request – Stream is either already enabled or cannot be enabled on trial plan. Status code `400`. Applicable to 1 of 66 methods.*
574
+ * [`StreamAlreadyDisabledError`](./src/fastpix_python/errors/streamalreadydisablederror.py): Stream already disabled. Status code `400`. Applicable to 1 of 66 methods.*
575
+ * [`SimulcastUnavailableError`](./src/fastpix_python/errors/simulcastunavailableerror.py): Simulcast is not available for trial streams. Status code `400`. Applicable to 1 of 66 methods.*
576
+ * [`MediaClipNotFoundError`](./src/fastpix_python/errors/mediaclipnotfounderror.py): media workspace relation not found. Status code `404`. Applicable to 1 of 66 methods.*
577
+ * [`DuplicateReferenceIDErrorResponse`](./src/fastpix_python/errors/duplicatereferenceiderrorresponse.py): Displays the result of the request. Status code `409`. Applicable to 1 of 66 methods.*
578
+ * [`ResponseValidationError`](./src/fastpix_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.
579
+
580
+ </details>
581
+
582
+ \* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
583
+ <!-- End Error Handling [errors] -->
584
+
585
+ <!-- Start Server Selection [server] -->
586
+ ## Server Selection
587
+
588
+ ### Override Server URL Per-Client
589
+
590
+ 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:
591
+ ```python
592
+ from fastpix_python import Fastpix, models
593
+
594
+
595
+ with Fastpix(
596
+ server_url="https://api.fastpix.io/v1/",
597
+ security=models.Security(
598
+ username = "your-access-token",
599
+ password = "secret-key",
600
+ ),
601
+ ) as fastpix:
602
+
603
+ res = fastpix.input_video.create_media(inputs=[
604
+ {
605
+ "type": "video",
606
+ "url": "https://static.fastpix.io/sample.mp4",
607
+ },
608
+ ], access_policy="public", metadata={
609
+ "key1": "value1",
610
+ }, subtitles={
611
+ "language_name": "english",
612
+ "metadata": {
613
+ "key1": "value1",
614
+ },
615
+ "language_code": "en",
616
+ }, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
617
+ "generate": True,
618
+ }, chapters=True, named_entities=True)
619
+
620
+ # Handle response
621
+ print(res)
622
+
623
+ ```
624
+ <!-- End Server Selection [server] -->
625
+
626
+ <!-- Start Custom HTTP Client [http-client] -->
627
+ ## Custom HTTP Client
628
+
629
+ 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.
630
+ 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.
631
+ 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.
632
+
633
+ For example, you could specify a header for every request that this sdk makes as follows:
634
+ ```python
635
+ from fastpix_python import Fastpix
636
+ import httpx
637
+
638
+ http_client = httpx.Client(headers={"x-custom-header": "someValue"})
639
+ s = Fastpix(client=http_client)
640
+ ```
641
+
642
+ or you could wrap the client with your own custom logic:
643
+ ```python
644
+ from fastpix_python import Fastpix
645
+ from fastpix_python.httpclient import AsyncHttpClient
646
+ import httpx
647
+
648
+ class CustomClient(AsyncHttpClient):
649
+ client: AsyncHttpClient
650
+
651
+ def __init__(self, client: AsyncHttpClient):
652
+ self.client = client
653
+
654
+ async def send(
655
+ self,
656
+ request: httpx.Request,
657
+ *,
658
+ stream: bool = False,
659
+ auth: Union[
660
+ httpx._types.AuthTypes, httpx._client.UseClientDefault, None
661
+ ] = httpx.USE_CLIENT_DEFAULT,
662
+ follow_redirects: Union[
663
+ bool, httpx._client.UseClientDefault
664
+ ] = httpx.USE_CLIENT_DEFAULT,
665
+ ) -> httpx.Response:
666
+ request.headers["Client-Level-Header"] = "added by client"
667
+
668
+ return await self.client.send(
669
+ request, stream=stream, auth=auth, follow_redirects=follow_redirects
670
+ )
671
+
672
+ def build_request(
673
+ self,
674
+ method: str,
675
+ url: httpx._types.URLTypes,
676
+ *,
677
+ content: Optional[httpx._types.RequestContent] = None,
678
+ data: Optional[httpx._types.RequestData] = None,
679
+ files: Optional[httpx._types.RequestFiles] = None,
680
+ json: Optional[Any] = None,
681
+ params: Optional[httpx._types.QueryParamTypes] = None,
682
+ headers: Optional[httpx._types.HeaderTypes] = None,
683
+ cookies: Optional[httpx._types.CookieTypes] = None,
684
+ timeout: Union[
685
+ httpx._types.TimeoutTypes, httpx._client.UseClientDefault
686
+ ] = httpx.USE_CLIENT_DEFAULT,
687
+ extensions: Optional[httpx._types.RequestExtensions] = None,
688
+ ) -> httpx.Request:
689
+ return self.client.build_request(
690
+ method,
691
+ url,
692
+ content=content,
693
+ data=data,
694
+ files=files,
695
+ json=json,
696
+ params=params,
697
+ headers=headers,
698
+ cookies=cookies,
699
+ timeout=timeout,
700
+ extensions=extensions,
701
+ )
702
+
703
+ s = Fastpix(async_client=CustomClient(httpx.AsyncClient()))
704
+ ```
705
+ <!-- End Custom HTTP Client [http-client] -->
706
+
707
+ <!-- Start Resource Management [resource-management] -->
708
+ ## Resource Management
709
+
710
+ The `Fastpix` 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.
711
+
712
+ [context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
713
+
714
+ ```python
715
+ from fastpix_python import Fastpix, models
716
+ def main():
717
+
718
+ with Fastpix(
719
+ security=models.Security(
720
+ username = "your-access-token",
721
+ password = "secret-key",
722
+ ),
723
+ ) as fastpix:
724
+ # Rest of application here...
725
+
726
+
727
+ # Or when using async:
728
+ async def amain():
729
+
730
+ async with Fastpix(
731
+ security=models.Security(
732
+ username = "your-access-token",
733
+ password = "secret-key",
734
+ ),
735
+ ) as fastpix:
736
+ # Rest of application here...
737
+ ```
738
+ <!-- End Resource Management [resource-management] -->
739
+
740
+ <!-- Start Debugging [debug] -->
741
+ ## Debugging
742
+
743
+ You can setup your SDK to emit debug logs for SDK requests and responses.
744
+
745
+ You can pass your own logger class directly into your SDK.
746
+ ```python
747
+ from fastpix_python import Fastpix
748
+ import logging
749
+
750
+ logging.basicConfig(level=logging.DEBUG)
751
+ s = Fastpix(debug_logger=logging.getLogger("fastpix_python"))
752
+ ```
753
+
754
+ You can also enable a default debug logger by setting an environment variable `FASTPIX_DEBUG` to true.
755
+ <!-- End Debugging [debug] -->
756
+
757
+ <!-- Placeholder for Future fastpix SDK Sections -->
758
+
759
+ # Development
760
+ This SDK is automatically generated from our API specifications. Manual modifications to internal files will be overwritten during the next generation cycle.
761
+ We welcome community contributions and feedback. Please submit pull requests or open issues with your suggestions and we'll consider them for future releases.
762
+
763
+ ## Detailed Usage
764
+
765
+ For a complete understanding of each API's functionality, including request and response details, parameter descriptions, and additional examples, please refer to the [FastPix API Reference](https://docs.fastpix.io/reference/signingkeys-overview).
766
+
767
+ The API reference provides comprehensive documentation for all available endpoints and features, ensuring developers can integrate and utilize FastPix APIs efficiently.
768
+