Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (testpypi.python.org).
Help us improve Python packaging - Donate today!

A Python 3 module for the Akismet spam comment-spam-detection web service.

Project Description
pykismet
========

A Python 3 Akismet client library.

## Supported API

The Following Akismet API Calls are currently supported:
* Comment Check
* Submit Ham
* Submit Spam

## Unsupported API

The following Akismet API Calls are not yet supported:
* Key Verification

## Installation

1. Signup for Akismet and get yourself an API key at http://akismet.com/plans/

2. Install this library:

pip install pykismet

3. Make some calls to Akismet (see example below to get started)

## Example

Import and instantiate Pykismet.

from pykismet import Akismet
import os

a = Akismet(blog_url="http://your.blog/url",
user_agent="My Awesome Web App/0.0.1")

a.api_key="YOUR_AKISMET_API_KEY"

### Comment Check

a.check({'user_ip': os.environ['REMOTE_ADDR'],
'user_agent': os.environ['HTTP_USER_AGENT'],
'referrer': os.environ.get('HTTP_REFERER', 'unknown'),
'comment_content': 'I LIEK YOUR WEB SITE',
'comment_author': 'Comment Author',
'is_test': 1,
})

### Submit Ham

a.submit_ham({'user_ip': os.environ['REMOTE_ADDR'],
'user_agent': os.environ['HTTP_USER_AGENT'],
'referrer': os.environ.get('HTTP_REFERER', 'unknown'),
'comment_content': 'I LIEK YOUR WEB SITE',
'comment_author': 'Comment Author',
'is_test': 1,
})

### Submit Spam

a.submit_spam({'user_ip': os.environ['REMOTE_ADDR'],
'user_agent': os.environ['HTTP_USER_AGENT'],
'referrer': os.environ.get('HTTP_REFERER', 'unknown'),
'comment_content': 'I LIEK YOUR WEB SITE',
'comment_author': 'Comment Author',
'is_test': 1,
})

## Documentation

The examples above show you pretty much everything you need to know.

For a full list of supported parameters for each API call, see http://akismet.com/development/api/

The code is only ~150 lines long anyway, so just look at '''pykismet.py''' if you aren't sure about something.

## Bugs

Patches to fix bugs and implement missing features welcome! Please make a pull request.
Release History

Release History

This version
History Node

0.1.0

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pykismet-0.1.0-py2.py3-none-any.whl (5.1 kB) Copy SHA256 Checksum SHA256 3.3 Wheel Apr 16, 2014
pykismet-0.1.0.tar.gz (4.1 kB) Copy SHA256 Checksum SHA256 Source Apr 16, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting