资 源 简 介
python-calais v.1.4 -- Python interface to the OpenCalais API
This Python module is a wrapper around the OpenCalais API as documented at http://www.opencalais.com/calaisAPI by Reuters. It makes REST calls to the OpenCalais API via HTTP POST, then parses and simplifies the JSON responses returned by OpenCalais. You can then access the response data in a much more pythonic manner.
The module has only been tested with Python 2.5.
Dependencies:
simplejson (http://pypi.python.org/pypi/simplejson)
Basic Usage:
To use the OpenCalais API, first create a Calais() object, passing it your OpenCalais API key and a string identifier of your application:
>>> from calais import Calais>>> API_KEY = "your-opencalais-api-key">>> calais = Calais(API_KEY, submitter="python-calais demo")
You can then use the analyze() method. It takes a stri