加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
贡献代码
同步代码
取消
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
Version: 0.2.1
Copyright: Michael Foord 2005-2009
Home: http://www.voidspace.org.uk/python/modules.shtml#akismet

A python interface to the Akismet API. This is a web service for blocking SPAM comments to blogs - or other online services.

This is a quick fix to get Akismet working with non-ascii Unicode data. Please check PyPI if there is an official release. -Kumar

pip install git+git://github.com/kumar303/akismet.git#egg=akismet

You will need a Wordpress API key, from wordpress.com.

You should pass in the keyword argument 'agent' to the name of your program, when you create an Akismet instance. This sets the user-agent to a useful value.

The default is :

Python Interface by Fuzzyman | akismet.py/0.2.0

Whatever you pass in, will replace the Python Interface by Fuzzyman part. 0.2.0 will change with the version of this interface.

Usage example:

from akismet import Akismet

api = Akismet(agent='Test Script')
# if apikey.txt is in place,
# the key will automatically be set
# or you can call api.setAPIKey()
#
if api.key is None:
    print "No 'apikey.txt' file."
elif not api.verify_key():
    print "The API key is invalid."
else:
    # data should be a dictionary of values
    # They can all be filled in with defaults
    # from a CGI environment
    if api.comment_check(comment, data):
        print 'This comment is spam.'
    else:
        print 'This comment is ham.'

As of version 0.2.0 akismet.py can be used with Google AppEngine.

空文件

简介

暂无描述 展开 收起
取消

发行版

暂无发行版

贡献者

全部

近期动态

加载更多
不能加载更多了
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化