Metadata-Version: 2.4
Name: spamfilter
Version: 1.0.0
Summary: Create spam mitigation models with ease using fully-customizable, object oriented components.
Project-URL: GitHub, https://github.com/mags0ft/spamfilter
Project-URL: Homepage, https://mags0ft.github.io/spamfilter/
Author-email: Magnus Schlinsog <magnusschlinsog@gmail.com>
License: Copyright 2023-2025 Magnus Schlinsog <magnusschlinsog@gmail.com> and GitHub contributors.
        
        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
License-File: LICENSE
Keywords: anti spam,spam,spam filter,spam mitigation,spam protection,spamfilter
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.9
Provides-Extra: dev
Requires-Dist: pip-tools; extra == 'dev'
Requires-Dist: pytest; extra == 'dev'
Description-Content-Type: text/markdown

![Spamfilter Logo](https://raw.githubusercontent.com/mags0ft/spamfilter/master/docs/assets/icon.png)

# 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](https://mags0ft.github.io/spamfilter/)
 - [🔓 Report a security vulnerability](https://github.com/mags0ft/spamfilter/security/advisories/new)
 - [🚩 Create a new issue](https://github.com/mags0ft/spamfilter/issues/new/choose)
 - [👩‍💻 How to contribute](./CONTRIBUTING.md)
---

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

```bash
$ pip install spamfilter
```

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

```python
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!
