Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Python library for the Mollom anti-spam service
branch: master
Failed to load latest commit information.
API Reworked Site API.
.gitignore Code reformatting. Added licence text. Move to GitHub
README.rst Code reformatting. Added licence text. Added error classes. First steps towards the REST API usage.



A Python library for the Mollom anti-spam service.

A PyPI package is available at PyPI_pymollom. This package still implements the old XMLRPC API. Right now, the code base is moving towards the new REST API.

XMLRPC Example:

from Mollom import MollomAPI
from Mollom import MollomFault

def content_is_spam(content):
    mollom_api = MollomAPI(
    if not mollom_api.verifyKey():
        raise MollomFault('Your MOLLOM credentials are invalid.')

    cc = mollom_api.checkContent(postBody=content)
    # cc['spam']: 1 for ham, 2 for spam, 3 for unsure;
    if cc['spam'] == 2:
        return True
    return False
Something went wrong with that request. Please try again.