Vectorly's Python library enables provides a Python wrapper for the Vectorly API, enabling you to:
- Upload videos
- List current videos
- Search video
- Download video
- Get detail informaition about video
- Retrieve analytics
- Retrieve events
Use the package manager pip to install foobar.
pip install vectorly
To use the library, you will need an API Key.
You can get your API key in the "Settings page", which you can view by clicking on the user icon in the top-right hand corner.
import vectorly
API_KEY = '**********************'
def main():
vectorly_obj = Vectorly(API_KEY)
vectorly_obj.upload('video_file_pathname')
search_list = vectorly_obj.search('file_name')
for file in search_list:
detail = vectorly_obj.video_detail(file['id'])
print(detail)
if __name__ == '__main__':
main()
The API lets you perform the following operations on your videos
# create instance of Vectorly class
# default chank_size = 256000
vectorly_obj = Vectorly(API_KEI, chank_size)
# upload file
vectorly.upload(filename)
API_KEI - your API key
chank_size - chank size, default 256000
filename - Uploaded file name
Listing videos in Vectorly. When videos have the status "ready", you can begin playing the video, or you can download it
video_list = vectorly_obj.list()
Getting video details by video_id
video_detail = vectorly_obj.video_detail(video_id)
video_id - Video ID
Searching videos
search_list = vectorly_obj.search(search_term)
search_term - searching term
Download the compressed video to your system
vectorly_obj.download(video_id, destination)
video_id - Video ID
destination - Destination file
Overall summary of video playback over the last 30 days
vectorly_obj.analytics()
Retrieve all events from the last 90 days for a particular video
vectorly_obj.events(video_id)
video_id - Video ID, default None