Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install spam-blocklists

How to install spam-blocklists

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install spam-blocklists
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
0.9.1
0.9.3Never BuiltWhy not?
0.9.1 Available View build log
Windows (64-bit)
0.9.1
0.9.3Never BuiltWhy not?
0.9.1 Available View build log
Mac OS X (10.5+)
0.9.1
0.9.3Never BuiltWhy not?
0.9.1 Available View build log
Linux (32-bit)
0.9.1
0.9.3Never BuiltWhy not?
0.9.1 Available View build log
Linux (64-bit)
0.9.3 Available View build log
0.9.1 Available View build log
 
Imports
Lastest release
version 0.9.3 on Jan 9th, 2014
https://secure.travis-ci.org/fmarani/spam.png

A library to verify whether an url has been classified as spam

Supports:

  • SpamHaus zen
  • Surbl multi

Planned:

  • PhishTank

For any further information, you can watch the tutorial here: http://www.youtube.com/watch?v=anwy2MPT5RE

Install

From PyPI (stable):

pip install spam-blocklists

From Github (unstable):

pip install git+git://github.com/fmarani/spam.git#egg=spam-blocklists

Use

Spamhaus:

>>> from spam.spamhaus import SpamHausChecker
>>> checker = SpamHausChecker()

# google.com is a good domain
>>> checker.is_spam("http://www.google.com/search?q=food")
False

# this domain does not exist
>>> checker.is_spam("http://buyv1agra.com/")
Traceback (most recent call last):
    ...
DomainInexistentException

# this is a scam
>>> checker.is_spam("http://mihouyuan.com/login.htm")
True

Surbl:

>>> from spam.surbl import SurblChecker
>>> checker = SurblChecker()

# google.com test
>>> checker.is_spam("http://www.google.com/search?q=food")
False

# spamhaus says it is spam, surbl does not
>>> checker.is_spam("http://mihouyuan.com/login.htm")
False

# test endpoint for surbl
>>> checker.is_spam("http://surbl-org-permanent-test-point.com/")
True

Contribute

Clone and install testing dependencies:

pip install -r requirements.txt

Ensure tests pass:

./runtests.sh

Subscribe to package updates

Last updated Jan 9th, 2014

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.