A python module for accessing Netflix REST webservice, both V1 and V2 supports oauth and oob.
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.
Installing requests is simple with pip:
$ pip install pyflix2
or, with easy_install:
$ easy_install pyflix2
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']
- 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
$ python -mpyflix2 -s 'the matrix' -x
Or see help:
$ python -mpyflix2 -h
- 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
Note: I would like to thank Kirsten Jones for the library http://code.google.com/p/pyflix/ As pyflix2 was initially inspired by pyflix.
- Requires requests module minimum v1.1.0
- Install latest version of requests-oauthlib: pip install -U git+git://github.com/requests/requests-oauthlib.git
- Adding a new method to download the entire catalog into a file.
- 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
Backward incompatible changes
- get_user api signature has changed (require one more parameter user_id)
- Addition of user_id in ~/.pyflix.cfg
- get_access_token returns additional user_id
- Fixed access token retrival code in __main__.py
- Fixed typo in sample config file
- Issue #5: Fixed circular dependency in setup.py
- Initial version
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size pyflix2-0.2.1.tar.gz (17.9 kB)||File type Source||Python version None||Upload date||Hashes View hashes|