Movatterモバイル変換


[0]ホーム

URL:


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

Sign up
Appearance settings

Use Requests instead of httplib2#18

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
schworer merged 16 commits intomasterfromrequests-http
May 21, 2013
Merged
Show file tree
Hide file tree
Changes fromall commits
Commits
Show all changes
16 commits
Select commitHold shift + click to select a range
c07bacb
Add classifiers to zencoder-py package
May 3, 2013
cc1c1af
Use setuptools instead of distutils
May 3, 2013
e65f7b3
add version, author and title attrs to zencoder package
May 3, 2013
8999dda
Change HTTP library from httplib2 to requests.
May 18, 2013
1e824cc
Remove unneeded test
May 18, 2013
6b2f475
Remove references to XML
May 19, 2013
23d5da2
Test python 3.3 and pypy
May 19, 2013
397fcf4
Remove dependency on `urllib.urlencode`
May 19, 2013
0d9fdbc
Remove `encode` method and use `json.dumps` directly.
May 19, 2013
e574bbb
Pass `response.content` into `ZencoderResponseError`
May 19, 2013
0479f96
Implement unit tests with `mock`
May 19, 2013
fb1d90f
Use assertTrue instead of assertGreater in tests.
May 20, 2013
754b3b4
Update README
May 20, 2013
38d1e4e
Merge branch 'master' into requests-http
May 21, 2013
a6479eb
Add test for `Job.finish`
May 21, 2013
05d0d18
Add `live_stream` kwarg to Job.create
May 21, 2013
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion.travis.yml
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,6 +2,9 @@ language: python
python:
- "2.6"
- "2.7"
- "3.3"
- "pypy"
install: pip install -e .
# command to run tests
script: python test/test_zencoder.py
script: nosetests

6 changes: 4 additions & 2 deletionsREADME.md
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,15 @@
# Zencoder
[![Build Status](https://secure.travis-ci.org/schworer/zencoder-py.png)](http://travis-ci.org/schworer/zencoder-py)

A Python module for the [Zencoder](http://zencoder.com) API.

## Installation
Install from PyPI using `easy_install` or `pip`.

pip install zencoder

## Dependencies
`zencoder-py` depends on [httplib2](http://code.google.com/p/httplib2/), and uses the `json` or `simplejson` module.
`zencoder-py` depends on [requests](http://python-requests.org), and uses the `json` or `simplejson` module.

## Usage

Expand DownExpand Up@@ -60,5 +63,4 @@ Docs are in progress, and hosted at Read the Docs: http://zencoder.rtfd.org
* [Josh Kennedy](http://github.com/kennedyj)
* [Issac Kelly](http://github.com/issackelly)

[![Build Status](https://secure.travis-ci.org/schworer/zencoder-py.png)](http://travis-ci.org/schworer/zencoder-py)

22 changes: 18 additions & 4 deletionssetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@

from distutils.core import setup
try:
from setuptools import setup
except ImportError:
from distutils.core import setup

setup(name='zencoder',
version='0.5.2',
Expand All@@ -8,7 +10,19 @@
author_email='alex.schworer@gmail.com',
url='http://github.com/schworer/zencoder-py',
license="MIT License",
install_requires=['httplib2'],
packages=['zencoder']
install_requires=['requests>=1.0'],
tests_require=['mock', 'nose'],
packages=['zencoder'],
platforms='any',
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python',
'Programming Language :: Python :: 2.6',
'Programming Language :: Python :: 2.7',
'Topic :: Software Development :: Libraries :: Python Modules'
]
)

4 changes: 4 additions & 0 deletionstest/fixtures/account_create.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
{
"api_key": "abcd1234",
"password": "foo"
}
8 changes: 8 additions & 0 deletionstest/fixtures/account_details.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
{
"account_state": "active",
"plan": "Growth",
"minutes_used": 12549,
"minutes_included": 25000,
"billing_state": "active",
"integration_mode":true
}
10 changes: 10 additions & 0 deletionstest/fixtures/job_create.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
{
"outputs": [
{
"label": null,
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com/o/20130505/7a9f3b6947c27305079fb105dbfc529e/34356e4d54f0c8fb9c3273203937e795.mp4?AWSAccessKeyId=AKIAI456JQ76GBU7FECA&Signature=Tp9WVinpXKE%2FPrP2M08r54U4EQ0%3D&Expires=1367817210",
"id": 93461812
}
],
"id": 45492475
}
12 changes: 12 additions & 0 deletionstest/fixtures/job_create_live.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
{
"stream_url": "rtmp://foo:1935/live",
"stream_name": "bar",
"outputs": [
{
"label": null,
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com",
"id": 97931084
}
],
"id": 47010105
}
69 changes: 69 additions & 0 deletionstest/fixtures/job_details.json
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
{
"job": {
"submitted_at": "2013-05-04T21:36:39-07:00",
"state": "finished",
"privacy": false,
"input_media_file": {
"video_codec": "h264",
"frame_rate": 30,
"channels": "2",
"audio_codec": "aac",
"audio_bitrate_in_kbps": 50,
"state": "finished",
"format": "mpeg4",
"audio_sample_rate": 44100,
"privacy": false,
"height": 720,
"error_message": null,
"url": "s3://test-bucket/test.mov",
"video_bitrate_in_kbps": 1402,
"md5_checksum": null,
"duration_in_ms": 5067,
"test": false,
"id": 45469002,
"finished_at": "2013-05-04T21:36:46-07:00",
"updated_at": "2013-05-04T21:37:12-07:00",
"created_at": "2013-05-04T21:36:39-07:00",
"total_bitrate_in_kbps": 1452,
"width": 1280,
"error_class": null,
"file_size_bytes": 922620
},
"test": false,
"id": 45491013,
"finished_at": "2013-05-04T21:37:12-07:00",
"updated_at": "2013-05-04T21:37:12-07:00",
"created_at": "2013-05-04T21:36:39-07:00",
"thumbnails": [],
"output_media_files": [
{
"video_codec": "h264",
"frame_rate": 30,
"channels": "2",
"audio_codec": "aac",
"audio_bitrate_in_kbps": 90,
"state": "finished",
"format": "mpeg4",
"audio_sample_rate": 44100,
"label": null,
"privacy": false,
"height": 720,
"error_message": null,
"url": "https://zencoder-temp-storage-us-east-1.s3.amazonaws.com/o/20130505/fc7f7df4f3eacd6fe4ee88cab28732de/dfc2f1b4eb49ea9ab914c84de6d392fb.mp4?AWSAccessKeyId=AKIAI456JQ76GBU7FECA&Signature=lAc18iXd4ta1Ct0JyazKwYSwdOk%3D&Expires=1367815032",
"video_bitrate_in_kbps": 1440,
"md5_checksum": null,
"duration_in_ms": 5130,
"test": false,
"id": 93457943,
"finished_at": "2013-05-04T21:37:12-07:00",
"updated_at": "2013-05-04T21:37:12-07:00",
"created_at": "2013-05-04T21:36:39-07:00",
"total_bitrate_in_kbps": 1530,
"width": 1280,
"error_class": null,
"file_size_bytes": 973430
}
],
"pass_through": null
}
}
Loading

[8]ページ先頭

©2009-2025 Movatter.jp