Skip to content

Python library for uploading, compressing and streaming videos using Vectorly's stream product

License

Notifications You must be signed in to change notification settings

Vectorly/python-client

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Vectorly

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

Installation

Use the package manager pip to install foobar.

pip install vectorly

Getting your API key

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.

APIkey

Usage

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()

Methods

The API lets you perform the following operations on your videos

upload

# 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

list

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()

video_detail

Getting video details by video_id

video_detail = vectorly_obj.video_detail(video_id)

video_id - Video ID

search

Searching videos

search_list = vectorly_obj.search(search_term)

search_term - searching term

download

Download the compressed video to your system

vectorly_obj.download(video_id, destination)

video_id - Video ID
destination - Destination file

analytics

Overall summary of video playback over the last 30 days

vectorly_obj.analytics()

events

Retrieve all events from the last 90 days for a particular video

vectorly_obj.events(video_id)

video_id - Video ID, default None

License

MIT

About

Python library for uploading, compressing and streaming videos using Vectorly's stream product

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 51.4%
  • HTML 48.6%