[spam-stopper] Another Python API
Fuzzyman
fuzzyman at voidspace.org.uk
Fri Dec 2 09:33:49 UTC 2005
Hello All,
Hmmm... well I completed my Python API last night as well. Looks like
there are two :-)
http://www.voidspace.org.uk/cgi-bin/voidspace/downman.py?file=akismet-0.1.0.zip
Mine is implemented differently - as a single class (using urllib2
rather than httplib). There is sufficient documentation in the code.
It can read the api key and blog url from a text file called 'apikey.txt'
agent = 'Your program name'
from akismet import Akismet
api = Akismet(agent=agent)
# this reads 'apikey.txt' automatically
# or call :
# api = Akismet(key, blog_url, agent=agent)
check = api.verify_key()
test = api.check_comment(comment, data)
etc...
I also wrote a test CGI to check the interface - before I plug it into
my application. The verify key part works - unfortunately akismet seems
to be marking all comments I make to my CGI as spam ???
All the best,
Fuzzyman
http://www.voidspace.org.uk/python/index.shtml
More information about the spam-stopper
mailing list