Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit a1728bd

Browse filesBrowse files
committed
Update README.md
1 parent f91a402 commit a1728bd
Copy full SHA for a1728bd

File tree

1 file changed

+18
-2
lines changed
Filter options

1 file changed

+18
-2
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+18-2Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
A Python module for the [Zencoder](http://zencoder.com) API.
55

66
## Installation
7-
Install from PyPI using `easy_install` or `pip`.
7+
Install from PyPI using `pip`.
88

99
pip install zencoder
1010

@@ -13,19 +13,26 @@ Install from PyPI using `easy_install` or `pip`.
1313

1414
## Usage
1515

16+
### Create an instance of `Zencoder`
17+
1618
from zencoder import Zencoder
1719
zen = Zencoder('abc123') # enter your api key
1820

21+
### Submit a job
22+
1923
# creates an encoding job with the defaults
2024
job = zen.job.create('http://input-file/movie.avi')
2125
print job.code
2226
print job.body
2327
print job.body['id']
2428

29+
### Return output progress
30+
2531
# get the transcode progress of the first output
2632
progress = zen.output.progress(job.body['outputs'][0]['id'])
2733
print progress.body
2834

35+
### Create a new job with multiple outputs
2936

3037
# configure your outputs with dictionaries
3138
iphone = {
@@ -39,11 +46,20 @@ Install from PyPI using `easy_install` or `pip`.
3946
'url': 's3://output-bucket/output-file.vp8',
4047
'video_codec':, 'vp8'
4148
}
49+
4250
# the outputs kwarg requires an iterable
4351
outputs = (iphone, web)
4452
another_job = zen.job.create(input_url, outputs=outputs)
4553

46-
**Note:** If you set the `ZENCODER_API_KEY` environment variable to your api key, you don't have to provide it when initializing Zencoder.
54+
### ZENCODER_API_KEY Environment Variable
55+
56+
```python
57+
import os
58+
os.environ['ZENCODER_API_KEY'] = 'abcd1234'
59+
zen = Zencoder()
60+
```
61+
62+
If you set `ZENCODER_API_KEY` to your API Key, you don't have to provide it when initializing Zencoder.
4763

4864
## Specifying the API Version
4965
Set the version of the Zencoder API you want to use as the `api_version` keyword to the `Zencoder` object (defaults to `v2`):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.