pybrightcove Updates

It's been a few days since I announced that our python wrapper to the Brightcove API is open source. Since then I have completed a number of items:

Still a lot to be done, however, it has gotten the point now, where we are able to start using it to post videos.

Example

Usage:

$ python send.py FILENAME "TITLE" "SHORT DESCRIPTION" TAG1 TAG2 TAG3 ... TAGN

Code (based on example found in bin/send_file.py):

import sys
from pybrightcove.connection import Connection
from pybrightcove.video import Video

c = Connection()

video = Video()
video.name = sys.argv[2]
video.shortDescription = sys.argv[3]

for tag in sys.argv[4:]:
    video.tags.append(tag)

print "Uploading %s..." % sys.argv[1]
resp = c.create_video(sys.argv[1], video=video)
print "Video ID:", resp["result"]
if resp["error"]:
    print "ERROR:", resp["error"]["code"], resp["error"]["message"]

Would love some help!

Leave a Comment

In order to leave comments you must log in via Twitter

Comments

There are no comments yet. Why not leave one?