Skip to main content

Just a VdoCipher api wrapper for python.

Project description

vdocipher.py v0.5.1

Just a VdoCipher api wrapper for python.

Installing

$ pip install vdocipher.py

Using

import vdocipher 

# First, we need to authenticate our api
vdocipher.authenticate('VDOCIPHER_API_SECRET')

# Examples:

# obtaining a list of videos
videos = vdocipher.Video().get_list()

# obtaining a list of all videos
videos = vdocipher.Video().get_all()

# uploading a video
new_video = vdocipher.Video(title='title').upload('file')

# uploading a video from HTTP(s)/FTP urls
new_video = .vdocipher.Video().upload_by_url('url_video')

# obtaining a video
video = vdocipher.Video(id=1).get()

# search for videos
videos = vdocipher.Video().query('some_text')

# removing a video
vdocipher.Video(id=1).delete()

# adding a video subtitle
subtitle = vdocipher.Video(id=1).upload_subtitle('file')

# removing a video subtitle
subtitle = vdocipher.Video(id=1).delete_subtitle(subtitle.id)

# adding a video tag
video = vdocipher.Video(id=1).add_tags(['Ubuntu', 'Blender'])

# adding tag in multiple videos
vidos_id = ['xdv23rosj940fj49jfd9ajl','29fjue98lsd934hfg9']

tag_list = ['Vdocipher', 'Games', 'Unity']

response = self.vdocipher.Video().add_tags(videos_id=videos_id, tags=tag_list)

# searching videos with tag
video_list = vdocipher.Video().search_tag(tag='Unity')

# obtaining all tags
tag_list = vdocipher.Video().list_tags()

# changing video tags
video = elf.vdocipher.Video().replace_tag(['Capture-one', 'Zbrush'])

# changing tag in multiple videos
vidos_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 tag
video = vdocipher.Video(id=1).delete_tag('JavaScript')

# deleting all video tags
video = vdocipher.Video(id=1).delete_all_tags()

# deleting a tags in multiple videos
vidos_id = ['xdv23rosj940fj49jfd9ajl','29fjue98lsd934hfg9']
vdocipher.Video().delete_tag_by_video_ids(videos_ids=vidos_id, tag='PythonJS')

# deleting all tags in multiple videos
video = vdocipher.Video().delete_tag_to_video_ids(videos_id=video_list_id)

# List all files of a video including captions and posters
video = vdocipher.Video().list_all_files()

# adding a video poster
poster = vdocipher.Video(id=1).upload_poster('file')

# obtaining post url
poster_url = vdocipher.Video(id=1).get_url_posters()

# obtaining OTP
otp = OTP().create(videoid='your_video_id')

# or
otp = Video(title='test video').upload('file').create_otp()

# opt with anotations
 annotate = Annotate(
            annotation_type='text' # Set type parameter as "rtext" for Dynamic watermark
            text='Name: {name}, email: {email}, IP: {ip}', # You can add user identifiable information
            alpha='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 use

 duration = 15 * 24 * 3600 
 rule = LicenseRules(
     can_persist=True,
     rental_duration=duration
 )
 otp = vdocipher.OTP(license_rules=rule).create(videoid='your_video_id')
 
 # opt with url whitelist
 
 url = "vdocipher.com"
 otp = vdocipher.OTP(white_list_href=url).create(videoid='your_video_id')
 
 # otp with IP and GeoRules
 
 geo_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 bandwidth
 video_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 bandwidth
 date_filter = date(year=2021, month=5, day=13)
 bandwidth = vdocipher.VideoBandwidth()
 list_video_bandwidth = bandwidth.get(date_filter=date_filter)
 
 # obtaining video from bandwidth
 bandwidth = vdocipher.VideoBandwidth()
 video_bandwidth = bandwidth.get(date_filter)[0]
 video = video_bandwidth.video
 

Installing dev requirements

$ git clone https://github.com/puzzlsoftwarehouse/vdocipher.py.git
$ cd vdocipher.py
$ python -m venv .venv
$ source .venv/bin/activate
$ pip install .[dev]

build and publish

$ python setup.py sdist bdist_wheel
$ twine upload -r pypi dist/*

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vdocipher.py-0.5.1.tar.gz (11.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

vdocipher.py-0.5.1-py3.9.egg (33.3 kB view details)

Uploaded Egg

vdocipher.py-0.5.1-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file vdocipher.py-0.5.1.tar.gz.

File metadata

  • Download URL: vdocipher.py-0.5.1.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for vdocipher.py-0.5.1.tar.gz
Algorithm Hash digest
SHA256 68da8d02c27bce191a0ade008d2dce76110c42d5e79774938e863da9accbb69c
MD5 b9c3bfe73046faaf57b180538adea5cc
BLAKE2b-256 d80cb844840d8ed30abe16d8fd4e7ea1c274a3a15462e64ab68dec575c5ecf6f

See more details on using hashes here.

File details

Details for the file vdocipher.py-0.5.1-py3.9.egg.

File metadata

  • Download URL: vdocipher.py-0.5.1-py3.9.egg
  • Upload date:
  • Size: 33.3 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for vdocipher.py-0.5.1-py3.9.egg
Algorithm Hash digest
SHA256 b205d592d84bc81b640ffde5cd4cb8e91570352c5af23cab2becf202032846f7
MD5 89ef91d81b8182a7190d4478da8867d4
BLAKE2b-256 872d3f68b14ef95ed3026115a0adcb123c75fd599bcc49275cc05106f15a40fb

See more details on using hashes here.

File details

Details for the file vdocipher.py-0.5.1-py3-none-any.whl.

File metadata

  • Download URL: vdocipher.py-0.5.1-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7

File hashes

Hashes for vdocipher.py-0.5.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0ace4d1049ba14312210c3e867dd1f8781cb35670c900fcf7ef44d3cc41b5adc
MD5 2d04971016bdf8815213693ff138b6cf
BLAKE2b-256 ee81a3f504bbceda247c51908a0405bed66c9f042cc1a385264cb9a45eaac45d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page