skip to navigation
skip to content

Not Logged In

pyflix2 0.2.0

A python module for accessing Netflix REST webservice, both V1 and V2 supports oauth and oob.

Package Documentation

Introduction

pyflix2 is a BSD licensed python module for accessing netflix API (both v1 and v2) Netflix provides REST interfaces to access it's catalog and various user data. This module exposes easy to use object oriented interfaces that is inteded to make it even easier for python programmers to use.

Install

Installing requests is simple with pip:

$ pip install pyflix2

or, with easy_install:

$ easy_install pyflix2

Example

from pyflix2 import *

netflix = NetflixAPIV2( 'appname', 'key', 'shared_secret')
movies = netflix.title_autocomplete('Terminator', filter='instant')
for title in movies['autocomplete']['title']:
    print title

user = netflix.get_user('use_id', 'access_token', 'access_token_secret')
reco = user.get_reccomendations()
for movie in reco['recommendations']:
    print movie['title']['regular']
Note
  • Here appname, key and shared_secret needs to be obtained from: http://developer.netflix.com/apps/mykeys.
  • The user_id, access_token, access_token_secret needs to be obtained programmatically using get_request_token and get_access_token

Commandline

$ python -mpyflix2 -s 'the matrix' -x

Or see help:

$ python -mpyflix2 -h

Features

  • Supports both V1 and V2 of netflix REST API
  • Supports both out-of-bound (oauth 1.0a) and vanila three legged oauth auhentication
  • Provides easy to use and well documented functional interface for all the API exposed by netflix
  • Throws Exception for all kinds of error situation making it easier to integrate with other program
  • V1 and V2 APIs are exposed using different classes, so version specific features can be used easily
  • Internally uses Requests for making HTTP calls
  • Want any new feature? please file a feature request

Documentation: http://pyflix2.readthedocs.org/en/latest/index.html

Note: I would like to thank Kirsten Jones for the library http://code.google.com/p/pyflix/ As pyflix2 was initially inspired by pyflix.

History

0.2.0 (2013-01-26)

  • Issue #6: Add support for downloading full catalog in lib as well as in command line
  • Issue #8: Incorporate netflix api change to api-public.netflix.com
  • Issue #9: Update codebase to work with requests v1.1.0

0.1.3 (2012-07-09)

  • Fixed access token retrival code in __main__.py
  • Fixed typo in sample config file

0.1.2 (2012-07-06)

  • Issue #5: Fixed circular dependency in setup.py

0.1.1 (2012-07-04)

  • Initial version
 
File Type Py Version Uploaded on Size
pyflix2-0.2.0.tar.gz (md5) Source 2013-01-27 16KB
  • Downloads (All Versions):
  • 8 downloads in the last day
  • 54 downloads in the last week
  • 332 downloads in the last month
  • Author: Arup Malakar
  • Documentation: pyflix2 package documentation
  • Home Page: http://pyflix2.readthedocs.org/
  • License:
    Copyright (c) 2012, Arup Malakar 
    
    Redistribution and use in source and binary forms, with or without
    modification, are permitted provided that the following conditions are
    met:
    
      1. Redistributions of source code must retain the above copyright
         notice, this list of conditions and the following disclaimer.
    
      2. Redistributions in binary form must reproduce the above copyright
         notice, this list of conditions and the following disclaimer in
         the documentation and/or other materials provided with the
         distribution.
    
    THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
    "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
    LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
    A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL INFRAE OR
    CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  • Package Index Owner: amalakar
  • DOAP record: pyflix2-0.2.0.xml