Package: vdocipher.py
vdocipher.py  v0.5.1Just a VdoCipher api wrapper for python.Installing$pipinstallvdocipher.pyUsingimportvdocipher# First, we need to authenticate our apivdocipher.authenticate('VDOCIPHER_API_SECRET')# Examples:# obtaining a list of videosvideos=vdocipher.Video().get_list()# obtaining a list of all videosvideos=vdocipher.Video().get_all()# uploading a videonew_video=vdocipher.Video(title='title').upload('file')# uploading a video from HTTP(s)/FTP urlsnew_video=.vdocipher.Video().upload_by_url('url_video')# obtaining a videovideo=vdocipher.Video(id=1).get()# search for videosvideos=vdocipher.Video().query('some_text')# removing a videovdocipher.Video(id=1).delete()# adding a video subtitlesubtitle=vdocipher.Video(id=1).upload_subtitle('file')# removing a video subtitlesubtitle=vdocipher.Video(id=1).delete_subtitle(subtitle.id)# adding a video tagvideo=vdocipher.Video(id=1).add_tags(['Ubuntu','Blender'])# adding tag in multiple videosvidos_id=['xdv23rosj940fj49jfd9ajl','29fjue98lsd934hfg9']tag_list=['Vdocipher','Games','Unity']response=self.vdocipher.Video().add_tags(videos_id=videos_id,tags=tag_list)# searching videos with tagvideo_list=vdocipher.Video().search_tag(tag='Unity')# obtaining all tagstag_list=vdocipher.Video().list_tags()# changing video tagsvideo=elf.vdocipher.Video().replace_tag(['Capture-one','Zbrush'])# changing tag in multiple videosvidos_id=['xdv23rosj940fj49jfd9ajl','29fjue98lsd934hfg9']tag_list_replace=['Python','Rust','TypeScript']replace=vdocipher.Video().replace_tag(videos_id=video_list_id,tags=tag_list_replace)# deleting video tagvideo=vdocipher.Video(id=1).delete_tag('JavaScript')# deleting all video tagsvideo=vdocipher.Video(id=1).delete_all_tags()# deleting a tags in multiple videosvidos_id=['xdv23rosj940fj49jfd9ajl','29fjue98lsd934hfg9']vdocipher.Video().delete_tag_by_video_ids(videos_ids=vidos_id,tag='PythonJS')# deleting all tags in multiple videosvideo=vdocipher.Video().delete_tag_to_video_ids(videos_id=video_list_id)# List all files of a video including captions and postersvideo=vdocipher.Video().list_all_files()# adding a video posterposter=vdocipher.Video(id=1).upload_poster('file')# obtaining post urlposter_url=vdocipher.Video(id=1).get_url_posters()# obtaining OTPotp=OTP().create(videoid='your_video_id')# orotp=Video(title='test video').upload('file').create_otp()# opt with anotationsannotate=Annotate(annotation_type='text'# Set type parameter as "rtext" for Dynamic watermarktext='Name:{name}, email:{email}, IP:{ip}',# You can add user identifiable informationalpha='0.60',x='10',y='10',color='0xFF0000',size='15',interval='5000',skip='200')annotate_list=[annotate]otp=vdocipher.OTP(annotations=annotate_list).create(videoid='your_video_id')# generating OTP for offline useduration=15*24*3600rule=LicenseRules(can_persist=True,rental_duration=duration)otp=vdocipher.OTP(license_rules=rule).create(videoid='your_video_id')# opt with url whitelisturl="vdocipher.com"otp=vdocipher.OTP(white_list_href=url).create(videoid='your_video_id')# otp with IP and GeoRulesgeo_rules=IPGeoRule(actions=True,ip_set=["122.0.0.0/16","49.323.23.56"],country_set=["IN","GB"])geo_rule_list=[geo_rule]otp=vdocipher.OTP(ip_geo_rule=geo_rules_list).create(videoid='your_video_id')# obtaining video bandwidthvideo_obj=vdocipher.Video(id='12rew').get()date_filter=date(year=2021,month=5,day=13)video_bandwidth=video_obj.bandwidth(date_filter)# obtaining all video bandwidthdate_filter=date(year=2021,month=5,day=13)bandwidth=vdocipher.VideoBandwidth()list_video_bandwidth=bandwidth.get(date_filter=date_filter)# obtaining video from bandwidthbandwidth=vdocipher.VideoBandwidth()video_bandwidth=bandwidth.get(date_filter)[0]video=video_bandwidth.videoInstalling dev requirements$gitclonehttps://github.com/puzzlsoftwarehouse/vdocipher.py.git
$cdvdocipher.py
$python-mvenv.venv
$source.venv/bin/activate
$pipinstall.[dev]build and publish$pythonsetup.pysdistbdist_wheel
$twineupload-rpypidist/*