fastpix-python 0.1.8__tar.gz → 1.0.1__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.
- fastpix_python-1.0.1/PKG-INFO +767 -0
- fastpix_python-1.0.1/README.md +749 -0
- fastpix_python-1.0.1/pyproject.toml +52 -0
- {fastpix_python-0.1.8 → fastpix_python-1.0.1}/setup.py +2 -2
- fastpix_python-1.0.1/src/Fastpix/__init__.py +17 -0
- fastpix_python-1.0.1/src/Fastpix/_hooks/__init__.py +4 -0
- fastpix_python-1.0.1/src/Fastpix/_hooks/sdkhooks.py +74 -0
- fastpix_python-1.0.1/src/Fastpix/_hooks/types.py +112 -0
- fastpix_python-1.0.1/src/Fastpix/_version.py +15 -0
- fastpix_python-1.0.1/src/Fastpix/basesdk.py +368 -0
- fastpix_python-1.0.1/src/Fastpix/dimensions.py +473 -0
- fastpix_python-1.0.1/src/Fastpix/drm_configurations.py +511 -0
- fastpix_python-1.0.1/src/Fastpix/errors/__init__.py +239 -0
- fastpix_python-1.0.1/src/Fastpix/errors/badrequest_error.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors/duplicatemp4support_error.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/duplicatereferenceiderrorresponse.py +39 -0
- fastpix_python-1.0.1/src/Fastpix/errors/enable_live_streamop.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/errors/fastpixdefaulterror.py +40 -0
- fastpix_python-1.0.1/src/Fastpix/errors/fastpixerror.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/errors/forbidden_error.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors/forbiddenresponse_error.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/invalidpermission_error.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/invalidplaylistidresponse_error.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/livenotfounderror.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors/mediaclipnotfound_error.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/medianotfound_error.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors/mediaorplaybacknotfound_error.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/no_response_error.py +17 -0
- fastpix_python-1.0.1/src/Fastpix/errors/notfounderror.py +31 -0
- fastpix_python-1.0.1/src/Fastpix/errors/notfounderrorplaybackid.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/notfounderrorsimulcast.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/responsevalidationerror.py +11 -0
- fastpix_python-1.0.1/src/Fastpix/errors/signingkeynotfounderror.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/simulcastunavailable_error.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/streamalreadydisablederror.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/streamalreadyenablederror.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/trackduplicaterequest_error.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/trialplanrestrictionerror.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/errors/unauthorized_error.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors/unauthorizedresponse_error.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/errors/validationerrorresponse.py +19 -0
- fastpix_python-1.0.1/src/Fastpix/errors/viewnotfound_error.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/errors.py +271 -0
- fastpix_python-1.0.1/src/Fastpix/httpclient.py +125 -0
- fastpix_python-1.0.1/src/Fastpix/in_video_ai_features.py +1131 -0
- fastpix_python-1.0.1/src/Fastpix/input_video.py +729 -0
- fastpix_python-1.0.1/src/Fastpix/live_playback.py +743 -0
- fastpix_python-1.0.1/src/Fastpix/manage_live_stream.py +1973 -0
- fastpix_python-1.0.1/src/Fastpix/manage_videos.py +4123 -0
- fastpix_python-1.0.1/src/Fastpix/metrics.py +1117 -0
- fastpix_python-1.0.1/src/Fastpix/models/__init__.py +2097 -0
- fastpix_python-1.0.1/src/Fastpix/models/accesspolicy.py +12 -0
- fastpix_python-1.0.1/src/Fastpix/models/add_media_to_playlistop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/add_media_trackop.py +59 -0
- fastpix_python-1.0.1/src/Fastpix/models/addtrackrequest.py +43 -0
- fastpix_python-1.0.1/src/Fastpix/models/addtrackresponse.py +48 -0
- fastpix_python-1.0.1/src/Fastpix/models/audioinput.py +67 -0
- fastpix_python-1.0.1/src/Fastpix/models/badrequest_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/basicaccesspolicy.py +11 -0
- fastpix_python-1.0.1/src/Fastpix/models/browsernamedimensiondetails.py +27 -0
- fastpix_python-1.0.1/src/Fastpix/models/cancel_uploadop.py +42 -0
- fastpix_python-1.0.1/src/Fastpix/models/change_media_order_in_playlistop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/chaptersresponse.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/complete_live_streamop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/create_media_playback_idop.py +128 -0
- fastpix_python-1.0.1/src/Fastpix/models/create_playbackid_of_streamop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/create_simulcast_of_streamop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/createlivestreamrequest.py +79 -0
- fastpix_python-1.0.1/src/Fastpix/models/createmediarequest.py +333 -0
- fastpix_python-1.0.1/src/Fastpix/models/createmediaresponse.py +74 -0
- fastpix_python-1.0.1/src/Fastpix/models/createmediasuccessresponse.py +19 -0
- fastpix_python-1.0.1/src/Fastpix/models/createplaylistrequest.py +81 -0
- fastpix_python-1.0.1/src/Fastpix/models/createresponse.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/createsigningkeyresponsedto.py +32 -0
- fastpix_python-1.0.1/src/Fastpix/models/datapagination.py +49 -0
- fastpix_python-1.0.1/src/Fastpix/models/daterange.py +22 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_a_playlistop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_live_streamop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_media_from_playlistop.py +29 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_media_playback_idop.py +45 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_media_trackop.py +45 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_mediaop.py +36 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_playbackid_of_streamop.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_signing_keyop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/delete_simulcast_of_streamop.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/models/deletesigningkeyresponse.py +16 -0
- fastpix_python-1.0.1/src/Fastpix/models/direct_upload_video_mediaop.py +309 -0
- fastpix_python-1.0.1/src/Fastpix/models/directupload.py +56 -0
- fastpix_python-1.0.1/src/Fastpix/models/directuploadresponse.py +23 -0
- fastpix_python-1.0.1/src/Fastpix/models/disable_live_streamop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/domainrestrictions.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/drmidresponse.py +16 -0
- fastpix_python-1.0.1/src/Fastpix/models/duplicatemp4support_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/duplicatereferenceiderrorresponse.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/enable_live_streamop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/errordetails.py +119 -0
- fastpix_python-1.0.1/src/Fastpix/models/fielderror.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/forbidden_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/forbiddenresponse_error.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/generate_subtitle_trackop.py +61 -0
- fastpix_python-1.0.1/src/Fastpix/models/generatetrackresponse.py +116 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_all_playlistsop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_all_streamsop.py +45 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_data_viewlist_current_views_filterop.py +112 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_data_viewlist_current_views_gettimeseriesviewsop.py +95 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_live_stream_by_idop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_live_stream_playback_idop.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_live_stream_viewer_count_by_idop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_media_clipsop.py +48 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_mediaop.py +40 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_playback_idop.py +62 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_playlist_by_idop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_signing_key_by_idop.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_specific_simulcast_of_streamop.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_timeseries_dataop.py +203 -0
- fastpix_python-1.0.1/src/Fastpix/models/get_video_view_detailsop.py +42 -0
- fastpix_python-1.0.1/src/Fastpix/models/getallplaylistsresponse.py +24 -0
- fastpix_python-1.0.1/src/Fastpix/models/getallsigningkeyresponse.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/getallsigningkeyresponsedto.py +38 -0
- fastpix_python-1.0.1/src/Fastpix/models/getcreatelivestreamresponsedto.py +111 -0
- fastpix_python-1.0.1/src/Fastpix/models/getdrmconfigurationbyidop.py +38 -0
- fastpix_python-1.0.1/src/Fastpix/models/getdrmconfigurationop.py +50 -0
- fastpix_python-1.0.1/src/Fastpix/models/getpublicpemusingsigningkeyidresponsedto.py +50 -0
- fastpix_python-1.0.1/src/Fastpix/models/getstreamsresponse.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/models/invalidpermission_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/invalidplaylistidresponse_error.py +31 -0
- fastpix_python-1.0.1/src/Fastpix/models/languagecode.py +70 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_breakdown_valuesop.py +229 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_by_top_contentop.py +89 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_comparison_valuesop.py +182 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_dimensionsop.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_errorsop.py +117 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_filter_values_for_dimensionop.py +161 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_live_clipsop.py +74 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_mediaop.py +65 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_overall_valuesop.py +157 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_signing_keysop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_uploadsop.py +65 -0
- fastpix_python-1.0.1/src/Fastpix/models/list_video_viewsop.py +222 -0
- fastpix_python-1.0.1/src/Fastpix/models/livenotfounderror.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/livestreamdeleteresponse.py +16 -0
- fastpix_python-1.0.1/src/Fastpix/models/livestreamgetresponse.py +29 -0
- fastpix_python-1.0.1/src/Fastpix/models/livestreampagination.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/models/livestreamresponsedto.py +29 -0
- fastpix_python-1.0.1/src/Fastpix/models/media.py +136 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediacancelresponse.py +63 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediaclipnotfound_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediaclipresponse.py +303 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediaidsrequest.py +19 -0
- fastpix_python-1.0.1/src/Fastpix/models/medianotfound_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediaorplaybacknotfound_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/mediatype.py +12 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricsbreakdowndetails.py +96 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricscomparisondetails.py +72 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricsoveralldatadetails.py +127 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricsoverallmetadatadetails.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricstimeseriesdatadetails.py +83 -0
- fastpix_python-1.0.1/src/Fastpix/models/metricstimeseriesmetadatadetails.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/moderationresponse.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/namedentitiesresponse.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/notfounderror.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/notfounderrorplaybackid.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/notfounderrorsimulcast.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/pagination.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/models/patchlivestreamrequest.py +24 -0
- fastpix_python-1.0.1/src/Fastpix/models/patchresponsedata.py +97 -0
- fastpix_python-1.0.1/src/Fastpix/models/patchresponsedto.py +26 -0
- fastpix_python-1.0.1/src/Fastpix/models/playbackid.py +111 -0
- fastpix_python-1.0.1/src/Fastpix/models/playbackidrequest.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/playbackidresponse.py +26 -0
- fastpix_python-1.0.1/src/Fastpix/models/playbackidsuccessresponse.py +39 -0
- fastpix_python-1.0.1/src/Fastpix/models/playbacksettings.py +24 -0
- fastpix_python-1.0.1/src/Fastpix/models/playlistbyidresponse.py +118 -0
- fastpix_python-1.0.1/src/Fastpix/models/playlistcreatedresponse.py +26 -0
- fastpix_python-1.0.1/src/Fastpix/models/playlistcreatedschema.py +149 -0
- fastpix_python-1.0.1/src/Fastpix/models/playlistitem.py +37 -0
- fastpix_python-1.0.1/src/Fastpix/models/playlistorder.py +11 -0
- fastpix_python-1.0.1/src/Fastpix/models/policyaction.py +11 -0
- fastpix_python-1.0.1/src/Fastpix/models/retrievemediainputinfoop.py +49 -0
- fastpix_python-1.0.1/src/Fastpix/models/security.py +32 -0
- fastpix_python-1.0.1/src/Fastpix/models/signingkeynotfounderror.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/signingkeyworkspacedto.py +29 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastdeleteresponse.py +16 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastrequest.py +27 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastresponse.py +60 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastunavailable_error.py +42 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastupdaterequest.py +22 -0
- fastpix_python-1.0.1/src/Fastpix/models/simulcastupdateresponse.py +60 -0
- fastpix_python-1.0.1/src/Fastpix/models/singingkeyspagination.py +33 -0
- fastpix_python-1.0.1/src/Fastpix/models/sortorder.py +11 -0
- fastpix_python-1.0.1/src/Fastpix/models/srtplaybackresponse.py +30 -0
- fastpix_python-1.0.1/src/Fastpix/models/streamalreadydisablederror.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/streamalreadyenablederror.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/subtitleinput.py +40 -0
- fastpix_python-1.0.1/src/Fastpix/models/successresponse.py +29 -0
- fastpix_python-1.0.1/src/Fastpix/models/summaryresponse.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/toperrordetails.py +145 -0
- fastpix_python-1.0.1/src/Fastpix/models/track.py +48 -0
- fastpix_python-1.0.1/src/Fastpix/models/trackduplicaterequest_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/tracksubtitlesgeneraterequest.py +32 -0
- fastpix_python-1.0.1/src/Fastpix/models/trialplanrestrictionerror.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/unauthorized_error.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/unauthorizedresponse_error.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_a_playlistop.py +28 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_live_streamop.py +31 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_media_chaptersop.py +64 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_media_moderationop.py +69 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_media_named_entitiesop.py +64 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_media_summaryop.py +77 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_media_trackop.py +58 -0
- fastpix_python-1.0.1/src/Fastpix/models/update_specific_simulcast_of_streamop.py +40 -0
- fastpix_python-1.0.1/src/Fastpix/models/updated_mediaop.py +54 -0
- fastpix_python-1.0.1/src/Fastpix/models/updated_mp4supportop.py +71 -0
- fastpix_python-1.0.1/src/Fastpix/models/updated_source_accessop.py +62 -0
- fastpix_python-1.0.1/src/Fastpix/models/updateplaylistrequest.py +20 -0
- fastpix_python-1.0.1/src/Fastpix/models/updatetrackrequest.py +31 -0
- fastpix_python-1.0.1/src/Fastpix/models/updatetrackresponse.py +48 -0
- fastpix_python-1.0.1/src/Fastpix/models/useragentrestrictions.py +34 -0
- fastpix_python-1.0.1/src/Fastpix/models/videoinput.py +120 -0
- fastpix_python-1.0.1/src/Fastpix/models/viewnotfound_error.py +25 -0
- fastpix_python-1.0.1/src/Fastpix/models/views.py +1642 -0
- fastpix_python-1.0.1/src/Fastpix/models/viewsbytopcontentdetails.py +31 -0
- fastpix_python-1.0.1/src/Fastpix/models/viewscountresponse.py +35 -0
- fastpix_python-1.0.1/src/Fastpix/models/viewslist.py +182 -0
- fastpix_python-1.0.1/src/Fastpix/models/watermarkinput.py +85 -0
- fastpix_python-1.0.1/src/Fastpix/playback.py +823 -0
- fastpix_python-1.0.1/src/Fastpix/playlist.py +1985 -0
- fastpix_python-1.0.1/src/Fastpix/py.typed +1 -0
- fastpix_python-1.0.1/src/Fastpix/sdk.py +248 -0
- fastpix_python-1.0.1/src/Fastpix/sdkconfiguration.py +49 -0
- fastpix_python-1.0.1/src/Fastpix/signing_keys.py +1097 -0
- fastpix_python-1.0.1/src/Fastpix/simulcast_stream.py +1041 -0
- fastpix_python-1.0.1/src/Fastpix/start_live_stream.py +289 -0
- fastpix_python-1.0.1/src/Fastpix/types/__init__.py +21 -0
- fastpix_python-1.0.1/src/Fastpix/types/basemodel.py +39 -0
- fastpix_python-1.0.1/src/Fastpix/utils/__init__.py +200 -0
- fastpix_python-1.0.1/src/Fastpix/utils/annotations.py +79 -0
- fastpix_python-1.0.1/src/Fastpix/utils/datetimes.py +23 -0
- fastpix_python-1.0.1/src/Fastpix/utils/enums.py +74 -0
- fastpix_python-1.0.1/src/Fastpix/utils/eventstreaming.py +248 -0
- fastpix_python-1.0.1/src/Fastpix/utils/forms.py +223 -0
- fastpix_python-1.0.1/src/Fastpix/utils/headers.py +136 -0
- fastpix_python-1.0.1/src/Fastpix/utils/logger.py +27 -0
- fastpix_python-1.0.1/src/Fastpix/utils/metadata.py +118 -0
- fastpix_python-1.0.1/src/Fastpix/utils/queryparams.py +205 -0
- fastpix_python-1.0.1/src/Fastpix/utils/requestbodies.py +66 -0
- fastpix_python-1.0.1/src/Fastpix/utils/retries.py +217 -0
- fastpix_python-1.0.1/src/Fastpix/utils/security.py +195 -0
- fastpix_python-1.0.1/src/Fastpix/utils/serializers.py +249 -0
- fastpix_python-1.0.1/src/Fastpix/utils/unmarshal_json_response.py +24 -0
- fastpix_python-1.0.1/src/Fastpix/utils/url.py +155 -0
- fastpix_python-1.0.1/src/Fastpix/utils/values.py +140 -0
- fastpix_python-1.0.1/src/Fastpix/views_sdk.py +1297 -0
- fastpix_python-1.0.1/src/fastpix_python.egg-info/PKG-INFO +767 -0
- fastpix_python-1.0.1/src/fastpix_python.egg-info/SOURCES.txt +259 -0
- fastpix_python-1.0.1/src/fastpix_python.egg-info/requires.txt +3 -0
- fastpix_python-1.0.1/src/fastpix_python.egg-info/top_level.txt +1 -0
- fastpix_python-1.0.1/tests/test_fastpix_sdk.py +188 -0
- fastpix_python-0.1.8/PKG-INFO +0 -507
- fastpix_python-0.1.8/README.md +0 -471
- fastpix_python-0.1.8/fastpix/__init__.py +0 -4
- fastpix_python-0.1.8/fastpix/async_client/__init__.py +0 -3
- fastpix_python-0.1.8/fastpix/async_client/api.py +0 -33
- fastpix_python-0.1.8/fastpix/async_client/client.py +0 -52
- fastpix_python-0.1.8/fastpix/async_client/live_streams.py +0 -147
- fastpix_python-0.1.8/fastpix/async_client/media.py +0 -121
- fastpix_python-0.1.8/fastpix/async_client/playback_ids.py +0 -79
- fastpix_python-0.1.8/fastpix/client/__init__.py +0 -3
- fastpix_python-0.1.8/fastpix/client/api.py +0 -28
- fastpix_python-0.1.8/fastpix/client/client.py +0 -63
- fastpix_python-0.1.8/fastpix/client/live_streams.py +0 -150
- fastpix_python-0.1.8/fastpix/client/media.py +0 -110
- fastpix_python-0.1.8/fastpix/client/playback_ids.py +0 -80
- fastpix_python-0.1.8/fastpix/utilis/__init__.py +0 -4
- fastpix_python-0.1.8/fastpix/utilis/constants.py +0 -33
- fastpix_python-0.1.8/fastpix/utilis/exceptions.py +0 -14
- fastpix_python-0.1.8/fastpix/utilis/utilis.py +0 -17
- fastpix_python-0.1.8/fastpix_python.egg-info/PKG-INFO +0 -507
- fastpix_python-0.1.8/fastpix_python.egg-info/SOURCES.txt +0 -25
- fastpix_python-0.1.8/fastpix_python.egg-info/requires.txt +0 -4
- fastpix_python-0.1.8/fastpix_python.egg-info/top_level.txt +0 -1
- {fastpix_python-0.1.8 → fastpix_python-1.0.1}/LICENSE +0 -0
- {fastpix_python-0.1.8 → fastpix_python-1.0.1}/setup.cfg +0 -0
- {fastpix_python-0.1.8 → fastpix_python-1.0.1/src}/fastpix_python.egg-info/dependency_links.txt +0 -0
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fastpix_python
|
|
3
|
+
Version: 1.0.1
|
|
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](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/inputvideo/README.md#createmedia) - Upload video content from external URL
|
|
280
|
+
- [Upload from Device](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/inputvideo/README.md#direct_upload_video_media) - Upload video files directly from device
|
|
281
|
+
|
|
282
|
+
#### Manage Videos
|
|
283
|
+
- [List All Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#list_media) - Retrieve complete list of all media files
|
|
284
|
+
- [Get Media by ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#get_media) - Get detailed information for specific media
|
|
285
|
+
- [Update Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#updated_media) - Modify media metadata and settings
|
|
286
|
+
- [Delete Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#delete_media) - Remove media files from library
|
|
287
|
+
- [Add Track](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#add_media_track) - Add audio or subtitle tracks to media
|
|
288
|
+
- [Cancel Upload](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#cancel_upload) - Stop ongoing media upload process
|
|
289
|
+
- [Update Track](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#update_media_track) - Modify existing audio or subtitle tracks
|
|
290
|
+
- [Delete Track](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#delete_media_track) - Remove audio or subtitle tracks
|
|
291
|
+
- [Generate Subtitles](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#generate_subtitle_track) - Create automatic subtitles for media
|
|
292
|
+
- [Update Source Access](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#updated_source_access) - Control access permissions for media source
|
|
293
|
+
- [Update MP4 Support](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#updated_mp4_support) - Configure MP4 download capabilities
|
|
294
|
+
- [Get Input Info](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#retrieve_media_input_info) - Retrieve detailed input information
|
|
295
|
+
- [List Uploads](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#list_uploads) - Get all available upload URLs
|
|
296
|
+
- [Get Media Clips](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managevideos/README.md#get_media_clips) - Retrieve all video clips for media
|
|
297
|
+
|
|
298
|
+
#### Playback
|
|
299
|
+
- [Create Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playback/README.md#create_media_playback_id) - Generate secure playback identifier
|
|
300
|
+
- [Delete Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playback/README.md#delete_media_playback_id) - Remove playback access
|
|
301
|
+
- [Get Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playback/README.md#get_playback_id) - Retrieve playback configuration details
|
|
302
|
+
|
|
303
|
+
#### Playlist
|
|
304
|
+
- [Create Playlist](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#create_a_playlist) - Create new video playlist
|
|
305
|
+
- [List Playlists](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#get_all_playlists) - Get all available playlists
|
|
306
|
+
- [Get Playlist](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#get_playlist_by_id) - Retrieve specific playlist details
|
|
307
|
+
- [Update Playlist](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#update_a_playlist) - Modify playlist settings and metadata
|
|
308
|
+
- [Delete Playlist](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#delete_a_playlist) - Remove playlist from library
|
|
309
|
+
- [Add Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#add_media_to_playlist) - Add media items to playlist
|
|
310
|
+
- [Reorder Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#change_media_order_in_playlist) - Change order of media in playlist
|
|
311
|
+
- [Remove Media](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/playlist/README.md#delete_media_from_playlist) - Remove media from playlist
|
|
312
|
+
|
|
313
|
+
#### Signing Keys
|
|
314
|
+
- [Create Key](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/signingkeys/README.md#create_signing_key) - Generate new signing key pair
|
|
315
|
+
- [List Keys](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/signingkeys/README.md#list_signing_keys) - Get all available signing keys
|
|
316
|
+
- [Delete Key](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/signingkeys/README.md#delete_signing_key) - Remove signing key from system
|
|
317
|
+
- [Get Key](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/signingkeys/README.md#get_signing_key_by_id) - Retrieve specific signing key details
|
|
318
|
+
|
|
319
|
+
#### DRM Configurations
|
|
320
|
+
- [List DRM Configs](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/drmconfigurations/README.md#get_drm_configuration) - Get all DRM configuration options
|
|
321
|
+
- [Get DRM Config](https://github.com/FastPix/fastpix-python/blob/main/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](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/startlivestream/README.md#create_new_stream) - Initialize new live streaming session
|
|
331
|
+
|
|
332
|
+
#### Manage Live Stream
|
|
333
|
+
- [List Streams](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#get_all_streams) - Retrieve all active live streams
|
|
334
|
+
- [Get Viewer Count](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#get_live_stream_viewer_count_by_id) - Get real-time viewer statistics
|
|
335
|
+
- [Get Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#get_live_stream_by_id) - Retrieve detailed stream information
|
|
336
|
+
- [Delete Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#delete_live_stream) - Terminate and remove live stream
|
|
337
|
+
- [Update Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#update_live_stream) - Modify stream settings and configuration
|
|
338
|
+
- [Enable Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#enable_live_stream) - Activate live streaming
|
|
339
|
+
- [Disable Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#disable_live_stream) - Pause live streaming
|
|
340
|
+
- [Complete Stream](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/managelivestream/README.md#complete_live_stream) - Finalize and archive stream
|
|
341
|
+
|
|
342
|
+
#### Live Playback
|
|
343
|
+
- [Create Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/liveplayback/README.md#create_playback_id_of_stream) - Generate secure live playback access
|
|
344
|
+
- [Delete Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/liveplayback/README.md#delete_playback_id_of_stream) - Revoke live playback access
|
|
345
|
+
- [Get Playback ID](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/liveplayback/README.md#get_live_stream_playback_id) - Retrieve live playback configuration
|
|
346
|
+
|
|
347
|
+
#### Simulcast Stream
|
|
348
|
+
- [Create Simulcast](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/simulcaststream/README.md#create_simulcast_of_stream) - Set up multi-platform streaming
|
|
349
|
+
- [Delete Simulcast](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/simulcaststream/README.md#delete_simulcast_of_stream) - Remove simulcast configuration
|
|
350
|
+
- [Get Simulcast](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/simulcaststream/README.md#get_specific_simulcast_of_stream) - Retrieve simulcast settings
|
|
351
|
+
- [Update Simulcast](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/simulcaststream/README.md#update_specific_simulcast_of_stream) - Modify simulcast parameters
|
|
352
|
+
|
|
353
|
+
### Video Data API
|
|
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](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/metrics/README.md#list_breakdown_values) - Get detailed breakdown of metrics by dimension
|
|
361
|
+
- [List Overall Values](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/metrics/README.md#list_overall_values) - Get aggregated metric values across all content
|
|
362
|
+
- [Get Timeseries Data](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/metrics/README.md#get_timeseries_data) - Retrieve time-based metric trends and patterns
|
|
363
|
+
- [List Comparison Values](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/metrics/README.md#list_comparison_values) - Compare metrics across different time periods
|
|
364
|
+
|
|
365
|
+
#### Views
|
|
366
|
+
- [List Video Views](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/viewssdk/README.md#list_video_views) - Get comprehensive list of video viewing sessions
|
|
367
|
+
- [Get View Details](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/viewssdk/README.md#get_video_view_details) - Retrieve detailed information about specific video views
|
|
368
|
+
- [List Top Content](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/viewssdk/README.md#list_by_top_content) - Find your most popular and engaging content
|
|
369
|
+
- [Get Concurrent Viewers](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/viewssdk/README.md#get_data_viewlist_current_views_get_timeseries_views) - Monitor real-time viewer counts over time
|
|
370
|
+
- [Get Viewer Breakdown](https://github.com/FastPix/fastpix-python/blob/main/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](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/dimensions/README.md#list_dimensions) - Get available data dimensions for filtering and analysis
|
|
374
|
+
- [List Filter Values](https://github.com/FastPix/fastpix-python/blob/main/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
|
|
379
|
+
Enhance video content with AI-powered features including moderation, summarization, and intelligent categorization.
|
|
380
|
+
|
|
381
|
+
For detailed documentation, see [Video Moderation Guide](https://docs.fastpix.io/docs/using-nsfw-and-profanity-filter-for-video-moderation).
|
|
382
|
+
|
|
383
|
+
- [Generate Summary](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/invideoaifeatures/README.md#update_media_summary) - Create AI-generated video summaries
|
|
384
|
+
- [Create Chapters](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/invideoaifeatures/README.md#update_media_chapters) - Automatically generate video chapter markers
|
|
385
|
+
- [Extract Entities](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/invideoaifeatures/README.md#update_media_named_entities) - Identify and extract named entities from content
|
|
386
|
+
- [Enable Moderation](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/invideoaifeatures/README.md#update_media_moderation) - Activate content moderation and safety checks
|
|
387
|
+
|
|
388
|
+
|
|
389
|
+
### Error Handling
|
|
390
|
+
|
|
391
|
+
Handle and manage errors with comprehensive error handling capabilities and detailed error information for all API operations.
|
|
392
|
+
|
|
393
|
+
- [List Errors](https://github.com/FastPix/fastpix-python/blob/main/docs/sdks/errors/README.md#list_errors) - Retrieve comprehensive error logs and diagnostics
|
|
394
|
+
|
|
395
|
+
<!-- End API Reference [api-reference] -->
|
|
396
|
+
|
|
397
|
+
<!-- Start Retries [retries] -->
|
|
398
|
+
## Retries
|
|
399
|
+
|
|
400
|
+
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.
|
|
401
|
+
|
|
402
|
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
403
|
+
```python
|
|
404
|
+
from fastpix_python import Fastpix, models
|
|
405
|
+
from fastpix_python.utils import BackoffStrategy, RetryConfig
|
|
406
|
+
|
|
407
|
+
|
|
408
|
+
with Fastpix(
|
|
409
|
+
security=models.Security(
|
|
410
|
+
username = "your-access-token",
|
|
411
|
+
password = "secret-key",
|
|
412
|
+
),
|
|
413
|
+
) as fastpix:
|
|
414
|
+
|
|
415
|
+
res = fastpix.input_video.create_media(inputs=[
|
|
416
|
+
{
|
|
417
|
+
"type": "video",
|
|
418
|
+
"url": "https://static.fastpix.io/sample.mp4",
|
|
419
|
+
},
|
|
420
|
+
], access_policy="public", metadata={
|
|
421
|
+
"key1": "value1",
|
|
422
|
+
}, subtitles={
|
|
423
|
+
"language_name": "english",
|
|
424
|
+
"metadata": {
|
|
425
|
+
"key1": "value1",
|
|
426
|
+
},
|
|
427
|
+
"language_code": "en",
|
|
428
|
+
}, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
|
|
429
|
+
"generate": True,
|
|
430
|
+
}, chapters=True, named_entities=True,
|
|
431
|
+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
432
|
+
|
|
433
|
+
# Handle response
|
|
434
|
+
print(res)
|
|
435
|
+
|
|
436
|
+
```
|
|
437
|
+
|
|
438
|
+
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:
|
|
439
|
+
```python
|
|
440
|
+
from fastpix_python import Fastpix, models
|
|
441
|
+
from fastpix_python.utils import BackoffStrategy, RetryConfig
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
with Fastpix(
|
|
445
|
+
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
|
446
|
+
security=models.Security(
|
|
447
|
+
username = "your-access-token",
|
|
448
|
+
password = "secret-key",
|
|
449
|
+
),
|
|
450
|
+
) as fastpix:
|
|
451
|
+
|
|
452
|
+
res = fastpix.input_video.create_media(inputs=[
|
|
453
|
+
{
|
|
454
|
+
"type": "video",
|
|
455
|
+
"url": "https://static.fastpix.io/sample.mp4",
|
|
456
|
+
},
|
|
457
|
+
], access_policy="public", metadata={
|
|
458
|
+
"key1": "value1",
|
|
459
|
+
}, subtitles={
|
|
460
|
+
"language_name": "english",
|
|
461
|
+
"metadata": {
|
|
462
|
+
"key1": "value1",
|
|
463
|
+
},
|
|
464
|
+
"language_code": "en",
|
|
465
|
+
}, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
|
|
466
|
+
"generate": True,
|
|
467
|
+
}, chapters=True, named_entities=True)
|
|
468
|
+
|
|
469
|
+
# Handle response
|
|
470
|
+
print(res)
|
|
471
|
+
|
|
472
|
+
```
|
|
473
|
+
<!-- End Retries [retries] -->
|
|
474
|
+
|
|
475
|
+
<!-- Start Error Handling [errors] -->
|
|
476
|
+
## Error Handling
|
|
477
|
+
|
|
478
|
+
[`FastpixError`](./src/FastPix/errors/fastpixerror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
479
|
+
|
|
480
|
+
| Property | Type | Description |
|
|
481
|
+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
|
482
|
+
| `err.message` | `str` | Error message |
|
|
483
|
+
| `err.status_code` | `int` | HTTP response status code eg `404` |
|
|
484
|
+
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
|
485
|
+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
|
486
|
+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
|
487
|
+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |
|
|
488
|
+
|
|
489
|
+
### Example
|
|
490
|
+
```python
|
|
491
|
+
from fastpix_python import Fastpix, errors, models
|
|
492
|
+
|
|
493
|
+
|
|
494
|
+
with Fastpix(
|
|
495
|
+
security=models.Security(
|
|
496
|
+
username = "your-access-token",
|
|
497
|
+
password = "secret-key",
|
|
498
|
+
),
|
|
499
|
+
) as fastpix:
|
|
500
|
+
res = None
|
|
501
|
+
try:
|
|
502
|
+
|
|
503
|
+
res = fastpix.input_video.create_media(inputs=[
|
|
504
|
+
{
|
|
505
|
+
"type": "video",
|
|
506
|
+
"url": "https://static.fastpix.io/sample.mp4",
|
|
507
|
+
},
|
|
508
|
+
], access_policy="public", metadata={
|
|
509
|
+
"key1": "value1",
|
|
510
|
+
}, subtitles={
|
|
511
|
+
"language_name": "english",
|
|
512
|
+
"metadata": {
|
|
513
|
+
"key1": "value1",
|
|
514
|
+
},
|
|
515
|
+
"language_code": "en",
|
|
516
|
+
}, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
|
|
517
|
+
"generate": True,
|
|
518
|
+
}, chapters=True, named_entities=True)
|
|
519
|
+
|
|
520
|
+
# Handle response
|
|
521
|
+
print(res)
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
except errors.FastpixError as e:
|
|
525
|
+
# The base class for HTTP error responses
|
|
526
|
+
print(e.message)
|
|
527
|
+
print(e.status_code)
|
|
528
|
+
print(e.body)
|
|
529
|
+
print(e.headers)
|
|
530
|
+
print(e.raw_response)
|
|
531
|
+
|
|
532
|
+
# Depending on the method different errors may be thrown
|
|
533
|
+
if isinstance(e, errors.BadRequestError):
|
|
534
|
+
print(e.data.success) # Optional[bool]
|
|
535
|
+
print(e.data.error) # Optional[models.BadRequestError]
|
|
536
|
+
```
|
|
537
|
+
|
|
538
|
+
### Error Classes
|
|
539
|
+
**Primary errors:**
|
|
540
|
+
* [`FastpixError`](./src/Fastpix/errors/fastpixerror.py): The base class for HTTP error responses.
|
|
541
|
+
* [`InvalidPermissionError`](./src/Fastpix/errors/invalidpermission_error.py): *
|
|
542
|
+
* [`ValidationErrorResponse`](./src/Fastpix/errors/validationerrorresponse.py): Status code `422`. *
|
|
543
|
+
|
|
544
|
+
<details><summary>Less common errors (27)</summary>
|
|
545
|
+
|
|
546
|
+
<br />
|
|
547
|
+
|
|
548
|
+
**Network errors:**
|
|
549
|
+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
|
|
550
|
+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
|
|
551
|
+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
|
552
|
+
|
|
553
|
+
|
|
554
|
+
**Inherit from [`FastpixError`](./src/Fastpix/errors/fastpixerror.py)**:
|
|
555
|
+
* [`ForbiddenError`](./src/Fastpix/errors/forbidden_error.py): Status code `403`. Applicable to 26 of 66 methods.*
|
|
556
|
+
* [`UnauthorizedError`](./src/Fastpix/errors/unauthorized_error.py): Applicable to 24 of 66 methods.*
|
|
557
|
+
* [`MediaNotFoundError`](./src/Fastpix/errors/medianotfound_error.py): Status code `404`. Applicable to 17 of 66 methods.*
|
|
558
|
+
* [`BadRequestError`](./src/Fastpix/errors/badrequest_error.py): Bad Request. Status code `400`. Applicable to 10 of 66 methods.*
|
|
559
|
+
* [`NotFoundError`](./src/Fastpix/errors/notfounderror.py): Status code `404`. Applicable to 8 of 66 methods.*
|
|
560
|
+
* [`ViewNotFoundError`](./src/Fastpix/errors/viewnotfound_error.py): View Not Found. Status code `404`. Applicable to 7 of 66 methods.*
|
|
561
|
+
* [`LiveNotFoundError`](./src/Fastpix/errors/livenotfounderror.py): Stream Not Found. Status code `404`. Applicable to 6 of 66 methods.*
|
|
562
|
+
* [`InvalidPlaylistIDResponseError`](./src/Fastpix/errors/invalidplaylistidresponse_error.py): Payload Validation Failed. Status code `422`. Applicable to 6 of 66 methods.*
|
|
563
|
+
* [`UnAuthorizedResponseError`](./src/Fastpix/errors/unauthorizedresponse_error.py): response for unauthorized request. Status code `401`. Applicable to 4 of 66 methods.*
|
|
564
|
+
* [`ForbiddenResponseError`](./src/Fastpix/errors/forbiddenresponse_error.py): response for forbidden request. Status code `403`. Applicable to 4 of 66 methods.*
|
|
565
|
+
* [`TrackDuplicateRequestError`](./src/Fastpix/errors/trackduplicaterequest_error.py): Duplicate language name. Status code `400`. Applicable to 3 of 66 methods.*
|
|
566
|
+
* [`NotFoundErrorSimulcast`](./src/Fastpix/errors/notfounderrorsimulcast.py): Stream/Simulcast Not Found. Status code `404`. Applicable to 3 of 66 methods.*
|
|
567
|
+
* [`MediaOrPlaybackNotFoundError`](./src/Fastpix/errors/mediaorplaybacknotfound_error.py): Status code `404`. Applicable to 2 of 66 methods.*
|
|
568
|
+
* [`NotFoundErrorPlaybackID`](./src/Fastpix/errors/notfounderrorplaybackid.py): Status code `404`. Applicable to 2 of 66 methods.*
|
|
569
|
+
* [`SigningKeyNotFoundError`](./src/Fastpix/errors/signingkeynotfounderror.py): Bad Request. Status code `404`. Applicable to 2 of 66 methods.*
|
|
570
|
+
* [`DuplicateMp4SupportError`](./src/Fastpix/errors/duplicatemp4support_error.py): Mp4Support value already exists. Status code `400`. Applicable to 1 of 66 methods.*
|
|
571
|
+
* [`TrialPlanRestrictionError`](./src/Fastpix/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.*
|
|
572
|
+
* [`StreamAlreadyEnabledError`](./src/Fastpix/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.*
|
|
573
|
+
* [`StreamAlreadyDisabledError`](./src/Fastpix/errors/streamalreadydisablederror.py): Stream already disabled. Status code `400`. Applicable to 1 of 66 methods.*
|
|
574
|
+
* [`SimulcastUnavailableError`](./src/Fastpix/errors/simulcastunavailable_error.py): Simulcast is not available for trial streams. Status code `400`. Applicable to 1 of 66 methods.*
|
|
575
|
+
* [`MediaClipNotFoundError`](./src/Fastpix/errors/mediaclipnotfound_error.py): media workspace relation not found. Status code `404`. Applicable to 1 of 66 methods.*
|
|
576
|
+
* [`DuplicateReferenceIDErrorResponse`](./src/Fastpix/errors/duplicatereferenceiderrorresponse.py): Displays the result of the request. Status code `409`. Applicable to 1 of 66 methods.*
|
|
577
|
+
* [`ResponseValidationError`](./src/Fastpix/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.
|
|
578
|
+
|
|
579
|
+
</details>
|
|
580
|
+
|
|
581
|
+
\* Check [the method documentation](https://github.com/FastPix/fastpix-python/blob/main/README.md#available-resources-and-operations) to see if the error is applicable.
|
|
582
|
+
<!-- End Error Handling [errors] -->
|
|
583
|
+
|
|
584
|
+
<!-- Start Server Selection [server] -->
|
|
585
|
+
## Server Selection
|
|
586
|
+
|
|
587
|
+
### Override Server URL Per-Client
|
|
588
|
+
|
|
589
|
+
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:
|
|
590
|
+
```python
|
|
591
|
+
from fastpix_python import Fastpix, models
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
with Fastpix(
|
|
595
|
+
server_url="https://api.fastpix.io/v1/",
|
|
596
|
+
security=models.Security(
|
|
597
|
+
username = "your-access-token",
|
|
598
|
+
password = "secret-key",
|
|
599
|
+
),
|
|
600
|
+
) as fastpix:
|
|
601
|
+
|
|
602
|
+
res = fastpix.input_video.create_media(inputs=[
|
|
603
|
+
{
|
|
604
|
+
"type": "video",
|
|
605
|
+
"url": "https://static.fastpix.io/sample.mp4",
|
|
606
|
+
},
|
|
607
|
+
], access_policy="public", metadata={
|
|
608
|
+
"key1": "value1",
|
|
609
|
+
}, subtitles={
|
|
610
|
+
"language_name": "english",
|
|
611
|
+
"metadata": {
|
|
612
|
+
"key1": "value1",
|
|
613
|
+
},
|
|
614
|
+
"language_code": "en",
|
|
615
|
+
}, mp4_support="capped_4k", source_access=True, optimize_audio=True, max_resolution="1080p", summary={
|
|
616
|
+
"generate": True,
|
|
617
|
+
}, chapters=True, named_entities=True)
|
|
618
|
+
|
|
619
|
+
# Handle response
|
|
620
|
+
print(res)
|
|
621
|
+
|
|
622
|
+
```
|
|
623
|
+
<!-- End Server Selection [server] -->
|
|
624
|
+
|
|
625
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
626
|
+
## Custom HTTP Client
|
|
627
|
+
|
|
628
|
+
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.
|
|
629
|
+
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.
|
|
630
|
+
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.
|
|
631
|
+
|
|
632
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
|
633
|
+
```python
|
|
634
|
+
from fastpix_python import Fastpix
|
|
635
|
+
import httpx
|
|
636
|
+
|
|
637
|
+
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
|
638
|
+
s = Fastpix(client=http_client)
|
|
639
|
+
```
|
|
640
|
+
|
|
641
|
+
or you could wrap the client with your own custom logic:
|
|
642
|
+
```python
|
|
643
|
+
from fastpix_python import Fastpix
|
|
644
|
+
from fastpix_python.httpclient import AsyncHttpClient
|
|
645
|
+
import httpx
|
|
646
|
+
|
|
647
|
+
class CustomClient(AsyncHttpClient):
|
|
648
|
+
client: AsyncHttpClient
|
|
649
|
+
|
|
650
|
+
def __init__(self, client: AsyncHttpClient):
|
|
651
|
+
self.client = client
|
|
652
|
+
|
|
653
|
+
async def send(
|
|
654
|
+
self,
|
|
655
|
+
request: httpx.Request,
|
|
656
|
+
*,
|
|
657
|
+
stream: bool = False,
|
|
658
|
+
auth: Union[
|
|
659
|
+
httpx._types.AuthTypes, httpx._client.UseClientDefault, None
|
|
660
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
661
|
+
follow_redirects: Union[
|
|
662
|
+
bool, httpx._client.UseClientDefault
|
|
663
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
664
|
+
) -> httpx.Response:
|
|
665
|
+
request.headers["Client-Level-Header"] = "added by client"
|
|
666
|
+
|
|
667
|
+
return await self.client.send(
|
|
668
|
+
request, stream=stream, auth=auth, follow_redirects=follow_redirects
|
|
669
|
+
)
|
|
670
|
+
|
|
671
|
+
def build_request(
|
|
672
|
+
self,
|
|
673
|
+
method: str,
|
|
674
|
+
url: httpx._types.URLTypes,
|
|
675
|
+
*,
|
|
676
|
+
content: Optional[httpx._types.RequestContent] = None,
|
|
677
|
+
data: Optional[httpx._types.RequestData] = None,
|
|
678
|
+
files: Optional[httpx._types.RequestFiles] = None,
|
|
679
|
+
json: Optional[Any] = None,
|
|
680
|
+
params: Optional[httpx._types.QueryParamTypes] = None,
|
|
681
|
+
headers: Optional[httpx._types.HeaderTypes] = None,
|
|
682
|
+
cookies: Optional[httpx._types.CookieTypes] = None,
|
|
683
|
+
timeout: Union[
|
|
684
|
+
httpx._types.TimeoutTypes, httpx._client.UseClientDefault
|
|
685
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
686
|
+
extensions: Optional[httpx._types.RequestExtensions] = None,
|
|
687
|
+
) -> httpx.Request:
|
|
688
|
+
return self.client.build_request(
|
|
689
|
+
method,
|
|
690
|
+
url,
|
|
691
|
+
content=content,
|
|
692
|
+
data=data,
|
|
693
|
+
files=files,
|
|
694
|
+
json=json,
|
|
695
|
+
params=params,
|
|
696
|
+
headers=headers,
|
|
697
|
+
cookies=cookies,
|
|
698
|
+
timeout=timeout,
|
|
699
|
+
extensions=extensions,
|
|
700
|
+
)
|
|
701
|
+
|
|
702
|
+
s = Fastpix(async_client=CustomClient(httpx.AsyncClient()))
|
|
703
|
+
```
|
|
704
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
705
|
+
|
|
706
|
+
<!-- Start Resource Management [resource-management] -->
|
|
707
|
+
## Resource Management
|
|
708
|
+
|
|
709
|
+
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.
|
|
710
|
+
|
|
711
|
+
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
|
|
712
|
+
|
|
713
|
+
```python
|
|
714
|
+
from fastpix_python import Fastpix, models
|
|
715
|
+
def main():
|
|
716
|
+
|
|
717
|
+
with Fastpix(
|
|
718
|
+
security=models.Security(
|
|
719
|
+
username = "your-access-token",
|
|
720
|
+
password = "secret-key",
|
|
721
|
+
),
|
|
722
|
+
) as fastpix:
|
|
723
|
+
# Rest of application here...
|
|
724
|
+
|
|
725
|
+
|
|
726
|
+
# Or when using async:
|
|
727
|
+
async def amain():
|
|
728
|
+
|
|
729
|
+
async with Fastpix(
|
|
730
|
+
security=models.Security(
|
|
731
|
+
username = "your-access-token",
|
|
732
|
+
password = "secret-key",
|
|
733
|
+
),
|
|
734
|
+
) as fastpix:
|
|
735
|
+
# Rest of application here...
|
|
736
|
+
```
|
|
737
|
+
<!-- End Resource Management [resource-management] -->
|
|
738
|
+
|
|
739
|
+
<!-- Start Debugging [debug] -->
|
|
740
|
+
## Debugging
|
|
741
|
+
|
|
742
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
743
|
+
|
|
744
|
+
You can pass your own logger class directly into your SDK.
|
|
745
|
+
```python
|
|
746
|
+
from fastpix_python import Fastpix
|
|
747
|
+
import logging
|
|
748
|
+
|
|
749
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
750
|
+
s = Fastpix(debug_logger=logging.getLogger("fastpix_python"))
|
|
751
|
+
```
|
|
752
|
+
|
|
753
|
+
You can also enable a default debug logger by setting an environment variable `FASTPIX_DEBUG` to true.
|
|
754
|
+
<!-- End Debugging [debug] -->
|
|
755
|
+
|
|
756
|
+
<!-- Placeholder for Future fastpix SDK Sections -->
|
|
757
|
+
|
|
758
|
+
# Development
|
|
759
|
+
This SDK is automatically generated from our API specifications. Manual modifications to internal files will be overwritten during the next generation cycle.
|
|
760
|
+
We welcome community contributions and feedback. Please submit pull requests or open issues with your suggestions and we'll consider them for future releases.
|
|
761
|
+
|
|
762
|
+
## Detailed Usage
|
|
763
|
+
|
|
764
|
+
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).
|
|
765
|
+
|
|
766
|
+
The API reference provides comprehensive documentation for all available endpoints and features, ensuring developers can integrate and utilize FastPix APIs efficiently.
|
|
767
|
+
|