🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

spamfilter

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

spamfilter

Create spam mitigation models with ease using fully-customizable, object oriented components.

1.0.0
PyPI
Maintainers
1

Spamfilter Logo

spamfilter

The spamfilter module is a lightweight, fast and straightforward way to build your own spam filtering machines in order to keep applications using user-generated content clean.

It's object-oriented and makes a quick, yet concise approach to remove spam easy.

Important links

  • 🌎 GitHub page
  • 🔓 Report a security vulnerability
  • 🚩 Create a new issue
  • 👩‍💻 How to contribute

Installation

You can install spamfilter by cloning the GitHub repository, downloading it from the GitHub page or using pip:

$ pip install spamfilter

Usage

Define a machine using several spam filters stacked onto each other.

from spamfilter.filters import Length, Symbols
from spamfilter.machines import Machine

m = Machine([
   Length(min_length=10, max_length=200, mode="crop"),
   Symbols(mode="normal")
])

TEST_STRING = "This is a test string."
print(m.check(TEST_STRING).passed)

License

This project is licensed under the MIT License as found in the LICENSE file.

Contributing

Feel free to contribute to the project using the GitHub repository. Additions to the spam filters, machines and documentation are always welcome!

Keywords

anti spam

FAQs

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts