Name | spamfilter JSON |
Version |
2.1.0
JSON |
| download |
home_page | None |
Summary | Create spam mitigation pipelines with ease using fully-customizable, object oriented components. |
upload_time | 2025-07-25 21:38:24 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
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. |
keywords |
anti spam
spam
spam filter
spam mitigation
spam protection
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
<p align="center">
<img src="https://raw.githubusercontent.com/mags0ft/spamfilter/master/docs/assets/icon-white-box.png" alt="Spamfilter logo" width=350>
</p>
<h1 align="center">spamfilter</h1>
<p align="center">
<img alt="PyPI - Downloads" src="https://img.shields.io/pypi/dm/spamfilter?style=for-the-badge&logo=pypi&labelColor=%231e1e1e" />
<img alt="GitHub Actions Workflow Status" src="https://img.shields.io/github/actions/workflow/status/mags0ft/spamfilter/python-package.yml?style=for-the-badge&logo=python&labelColor=%231e1e1e" />
<img alt="PyPI - License" src="https://img.shields.io/pypi/l/spamfilter?style=for-the-badge&labelColor=%231e1e1e" />
</p>
The `spamfilter` module is a lightweight, fast and straightforward Python package that helps you to build your own [spam filtering pipelines](https://mags0ft.github.io/spamfilter/pipelines/) in order to keep your applications featuring user-generated content clean.
It's object-oriented and makes a quick, concise approach to remove spam easy. `spamfilter` is highly configurable and ships with deep integrations for [third-party APIs](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.API), 🤗 Transformers [AI text classifiers](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.MLTextClassifier) and language models via [Ollama](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.Ollama).
---
**Important links**
- [🌎 Website and documentation](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](https://mags0ft.github.io/spamfilter/contributing/)
## Installation
You can [install spamfilter](https://mags0ft.github.io/spamfilter/installation/) by cloning the GitHub repository, downloading it from the GitHub page or using pip - which is the recommended approach:
```bash
pip install spamfilter
```
Please see the [installation guide](https://mags0ft.github.io/spamfilter/installation/) for more information and methods on how to install `spamfilter` and its dependencies, especially if you plan to use API or Ollama functionality.
## Usage
The most basic primer into the `spamfilter` library is to define a [pipeline](https://mags0ft.github.io/spamfilter/pipelines/) using several spam [filters](https://mags0ft.github.io/spamfilter/filters/) stacked onto each other.
```python
from spamfilter.filters import Length, SpecialChars
from spamfilter.pipelines import Pipeline
# create a new pipeline
m = Pipeline([
# length of 10 to 200 chars, crop if needed
Length(min_length=10, max_length=200, mode="crop"),
# limit use of special characters
SpecialChars(mode="normal")
])
# test a string against it
TEST_STRING = "This is a test string."
print(m.check(TEST_STRING).passed)
```
Output:
```
True
```
## License
This project is licensed under the MIT License, as declared in the [`LICENSE` file](./LICENSE).
## Contributing
Feel free to contribute to the project using the GitHub repository. Additions to the spam filters, pipelines and documentation are always welcome!
Learn more [here](https://mags0ft.github.io/spamfilter/contributing/) if you're interested in helping out!
Raw data
{
"_id": null,
"home_page": null,
"name": "spamfilter",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "anti spam, spam, spam filter, spam mitigation, spam protection",
"author": null,
"author_email": "Magnus Schlinsog <magnusschlinsog@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/6e/d2/3e40daf87af21489d1973da90a5888ed4df3311a8e1c812ceae86c3103ca/spamfilter-2.1.0.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img src=\"https://raw.githubusercontent.com/mags0ft/spamfilter/master/docs/assets/icon-white-box.png\" alt=\"Spamfilter logo\" width=350>\n</p>\n\n<h1 align=\"center\">spamfilter</h1>\n\n<p align=\"center\">\n <img alt=\"PyPI - Downloads\" src=\"https://img.shields.io/pypi/dm/spamfilter?style=for-the-badge&logo=pypi&labelColor=%231e1e1e\" />\n <img alt=\"GitHub Actions Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/mags0ft/spamfilter/python-package.yml?style=for-the-badge&logo=python&labelColor=%231e1e1e\" />\n <img alt=\"PyPI - License\" src=\"https://img.shields.io/pypi/l/spamfilter?style=for-the-badge&labelColor=%231e1e1e\" />\n</p>\n\nThe `spamfilter` module is a lightweight, fast and straightforward Python package that helps you to build your own [spam filtering pipelines](https://mags0ft.github.io/spamfilter/pipelines/) in order to keep your applications featuring user-generated content clean.\n\nIt's object-oriented and makes a quick, concise approach to remove spam easy. `spamfilter` is highly configurable and ships with deep integrations for [third-party APIs](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.API), \ud83e\udd17 Transformers [AI text classifiers](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.MLTextClassifier) and language models via [Ollama](https://mags0ft.github.io/spamfilter/filters/#spamfilter.filters.Ollama).\n\n---\n\n**Important links**\n- [\ud83c\udf0e Website and documentation](https://mags0ft.github.io/spamfilter/)\n- [\ud83d\udd13 Report a security vulnerability](https://github.com/mags0ft/spamfilter/security/advisories/new)\n- [\ud83d\udea9 Create a new issue](https://github.com/mags0ft/spamfilter/issues/new/choose)\n- [\ud83d\udc69\u200d\ud83d\udcbb How to contribute](https://mags0ft.github.io/spamfilter/contributing/)\n\n## Installation\n\nYou can [install spamfilter](https://mags0ft.github.io/spamfilter/installation/) by cloning the GitHub repository, downloading it from the GitHub page or using pip - which is the recommended approach:\n\n```bash\npip install spamfilter\n```\n\nPlease see the [installation guide](https://mags0ft.github.io/spamfilter/installation/) for more information and methods on how to install `spamfilter` and its dependencies, especially if you plan to use API or Ollama functionality.\n\n## Usage\n\nThe most basic primer into the `spamfilter` library is to define a [pipeline](https://mags0ft.github.io/spamfilter/pipelines/) using several spam [filters](https://mags0ft.github.io/spamfilter/filters/) stacked onto each other.\n\n```python\nfrom spamfilter.filters import Length, SpecialChars\nfrom spamfilter.pipelines import Pipeline\n\n# create a new pipeline\nm = Pipeline([\n # length of 10 to 200 chars, crop if needed\n Length(min_length=10, max_length=200, mode=\"crop\"),\n # limit use of special characters\n SpecialChars(mode=\"normal\")\n])\n\n# test a string against it\nTEST_STRING = \"This is a test string.\"\nprint(m.check(TEST_STRING).passed)\n```\n\nOutput:\n\n```\nTrue\n```\n\n## License\n\nThis project is licensed under the MIT License, as declared in the [`LICENSE` file](./LICENSE).\n\n## Contributing\n\nFeel free to contribute to the project using the GitHub repository. Additions to the spam filters, pipelines and documentation are always welcome!\n\nLearn more [here](https://mags0ft.github.io/spamfilter/contributing/) if you're interested in helping out!\n",
"bugtrack_url": null,
"license": "Copyright 2023-2025 Magnus Schlinsog <magnusschlinsog@gmail.com> and GitHub contributors.\n \n Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \u201cSoftware\u201d), 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:\n \n The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \u201cAS IS\u201d, 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.",
"summary": "Create spam mitigation pipelines with ease using fully-customizable, object oriented components.",
"version": "2.1.0",
"project_urls": {
"GitHub": "https://github.com/mags0ft/spamfilter",
"Homepage": "https://mags0ft.github.io/spamfilter/"
},
"split_keywords": [
"anti spam",
" spam",
" spam filter",
" spam mitigation",
" spam protection"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "11cbb95d41ca49eed645c9c1bfd4a4e6197af6c0bc1e7f3521231713cd578ed5",
"md5": "f58a701fc4334b76f31ce7ee6facc0ba",
"sha256": "4e817d3431c5f772539de460efd6f8da4d564060ad7a6aadd898bec686c1298e"
},
"downloads": -1,
"filename": "spamfilter-2.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f58a701fc4334b76f31ce7ee6facc0ba",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 23667,
"upload_time": "2025-07-25T21:38:22",
"upload_time_iso_8601": "2025-07-25T21:38:22.988306Z",
"url": "https://files.pythonhosted.org/packages/11/cb/b95d41ca49eed645c9c1bfd4a4e6197af6c0bc1e7f3521231713cd578ed5/spamfilter-2.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "6ed23e40daf87af21489d1973da90a5888ed4df3311a8e1c812ceae86c3103ca",
"md5": "f4ba6fb54c49b34be916068476008868",
"sha256": "d896591d4df8cd108dc29ca7b6db5e1e4d4d401da05f2d99491873a55349334e"
},
"downloads": -1,
"filename": "spamfilter-2.1.0.tar.gz",
"has_sig": false,
"md5_digest": "f4ba6fb54c49b34be916068476008868",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 514130,
"upload_time": "2025-07-25T21:38:24",
"upload_time_iso_8601": "2025-07-25T21:38:24.503125Z",
"url": "https://files.pythonhosted.org/packages/6e/d2/3e40daf87af21489d1973da90a5888ed4df3311a8e1c812ceae86c3103ca/spamfilter-2.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 21:38:24",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "mags0ft",
"github_project": "spamfilter",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "spamfilter"
}