A simple Python script to interact with Spamhaus APIs from CLI
Project description
pyspamhauscli
Description
A simple Python script to interact with Spamhaus APIs from cli.
Usage
$ pip install pyspamhauscli
$ python pyspamhauscli.py -h
usage: pyspamhauscli.py [-h] [-k API_KEY] [-a {submit,get_threats_types,get_subs_list,get_subs_counter}] [-i INPUT_FILE] [-r REASON]
version: 1.2
options:
-h, --help show this help message and exit
common parameters:
-k, --api-key API_KEY
API key (could either be provided in the "SECRET_SPAMHAUS_API_KEY" env var)
-a, --action {submit,get_threats_types,get_subs_list,get_subs_counter}
Action to do on Spamhaus (default 'submit')
'submit' action parameters:
-i, --input-file INPUT_FILE
Input file (list of newline-separated FQDN or URL or IP or email address)
-r, --reason REASON Reason to use (max length 255 characters)
Changelog
- version 1.1->1.2 - 2025-09-07: Publication on pypi.org and few fixes
Copyright and license
pyspamhauscli is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
pyspamhauscli is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU General Public License along with pyspamhauscli. If not, see http://www.gnu.org/licenses/.
Contact
- Thomas Debize < tdebize at mail d0t com >
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyspamhauscli-1.2.tar.gz.
File metadata
- Download URL: pyspamhauscli-1.2.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a2ba0388e74d4c2f249a56a721769a82159b93d0eeae735416059f9ab4ce190e
|
|
| MD5 |
a04fb717587963d9a54630c0c0424cf2
|
|
| BLAKE2b-256 |
100504bb376be125ba7192fa44cd5a2a72a05c87d8dd266a760d0d811c24d79b
|
File details
Details for the file pyspamhauscli-1.2-py3-none-any.whl.
File metadata
- Download URL: pyspamhauscli-1.2-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a7d811f81f5b50f4348f764d6ccebd4ebfd568302039bd56f94c4236e5bbcea5
|
|
| MD5 |
75a2f4ce756e61b114e75b60c77cf747
|
|
| BLAKE2b-256 |
1ab9b1c49d1070b122454f9c10564ba4be27014a3bb9ebdcb812d63bff1b2217
|