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:
- Implemented typed exceptions
- Implemented various utility objects
- Implemented find_all_videos
- Fixed a couple bugs in create_video (using this in production now)
- Implemented the Video DTO
- Implemented the Playlist DTO
- Implemented the Rendition DTO
- Implemented the CuePoint DTO
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"]
Commentary
blog comments powered by Disqus