Just a VdoCipher api wrapper for python.
Project description
vdocipher.py
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()
# uploading a video
new_video = vdocipher.Video(title='title').upload('file')
# 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')
# 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 = IPGeoRules(
actions=True,
ip_set=["122.0.0.0/16", "49.323.23.56"],
country_set=["IN", "GB"]
)
geo_rules_list = [geo_rules]
otp = vdocipher.OTP(ip_geo_rules=geo_rules_list).create(videoid='your_video_id')
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
Release history Release notifications | RSS feed
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.4.7.tar.gz
(7.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file vdocipher.py-0.4.7.tar.gz.
File metadata
- Download URL: vdocipher.py-0.4.7.tar.gz
- Upload date:
- Size: 7.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a76f12c1cac7a924babe7c40bb0bbf3867402be5c7c7b2cdd7566887cb23d81
|
|
| MD5 |
de54aa51b542ec040f023c5b4641f3ea
|
|
| BLAKE2b-256 |
f855307fe159d75bfea4172a52d0d51a54292f6787eae46f577e2fdcac1c9543
|
File details
Details for the file vdocipher.py-0.4.7-py3-none-any.whl.
File metadata
- Download URL: vdocipher.py-0.4.7-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a7342125c480f23819188332cd27acffbd48e7cf624e6bd7250084892f3d164
|
|
| MD5 |
78d6bda9f76fbe460f1b1e30f9bb4c58
|
|
| BLAKE2b-256 |
c971cac58cd9f72d5be5a9f0c730d92a96e26d56a5a1cb7c3e3d185b30a003d5
|