inhibitor_tool
📌 Introduction
inhibitor_tool is a Python CLI tool that allows users to send, remove, and list inhibition requests via an API.
It supports authentication through environment variables loaded from auth_token.
🛠 Installation
You can install the package using pip:
pip3 install inhibitor_tool
🔧 Configuration
1️⃣ Set Up Authentication
Before using inhibitor_tool, you must configure authentication credentials in ~/.auth_token and load them into the environment:
echo 'export USERNAME="mmwei3"' >> ~/.auth_token
echo 'export PASSWORD="mmwei3password"' >> ~/.auth_token
echo 'export LOGIN_URL="https://auth.example.com/token"' >> ~/.auth_token
echo 'export INHIBIT_URL="https://inhibitor.example.com/add"' >> ~/.auth_token
echo 'export REMOVE_URL="https://inhibitor.example.com/remove"' >> ~/.auth_token
echo 'export LIST_URL="https://inhibitor.example.com/list"' >> ~/.auth_token
source ~/.auth_token
💡 Important: The
source ~/.auth_tokencommand must be executed every time a new session is started.
🚀 Usage
2️⃣ Inhibit an Item (Default TTL: 3 hours)
inhibitor-tool add --content "MaliciousIP:192.168.1.1"
3️⃣ Specify a Custom TTL
inhibitor-tool add --content "MaliciousIP:192.168.1.1" --ttl 6
--ttl 6means the inhibition will last 6 hours (default is 3 hours).
4️⃣ Add a Custom Remark
inhibitor-tool add --content "MaliciousIP:192.168.1.1" --ttl 6 --remark "Security alert"
- The remark helps track the reason for inhibition.
- If omitted, it defaults to
"tmp_inhibitor".
5️⃣ Remove an Inhibition
inhibitor-tool remove --content "MaliciousIP:192.168.1.1"
- This command removes an inhibition entry matching the provided content.
6️⃣ List Active Inhibitions
inhibitor-tool list
- Displays active inhibitions in a shell-friendly table format.
🔹 JSON Output Format
inhibitor-tool list --json
- Outputs inhibition data in JSON format, suitable for scripting.
7️⃣ Check Version
inhibitor-tool --version
inhibitor-tool -V
📜 Open-Source Information
- Author: mmwei3
- Email: mmwei3@iflytek.com
- Contact: 178555350258
- Date: 2025-03-19
- License: MIT License
📦 Packaging & Deployment
8️⃣ Build the Package
python setup.py sdist bdist_wheel
9️⃣ Install from Local Package
pip3 install dist/inhibitor_tool-1.0.0-py3-none-any.whl
🔟 Uninstall the Package
pip3 uninstall inhibitor_tool
📜 License (MIT)
MIT License
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...
📌 Dependencies (requirements.txt)
requests
This README.md provides a clear, structured, and fully configurable CLI tool for API-based inhibition with authentication, deletion support, and pip installation. 🚀
Metadata
Release files for inhibitor-tool 5.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| inhibitor_tool-5.2.1.tar.gz | 6.2 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| inhibitor_tool-5.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 14.9 kB
Release files / inhibitor_tool-5.2.1.tar.gz
| Download URL | inhibitor_tool-5.2.1.tar.gz |
|---|---|
| Size | 6.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5f781048d30bb9e60d4bee97a2adcedd6e235aa4ef3fcf9c54ed6bbc350a1f50
|
|
BLAKE2b-256 checksum How to use checksums |
fa1cf6224a42fd8a1c8723ea70775395469e58b75c4e27cde98777db9b502274
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
|
Release files / inhibitor_tool-5.2.1-py3-none-any.whl
| Download URL | inhibitor_tool-5.2.1-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3df2ddaf68a8a74be9b12db2ea3f78529b5c220db3f5717dcf34b0ef5b1ad545
|
|
BLAKE2b-256 checksum How to use checksums |
77e452b073a9b636c0789a9478ccd8f7d277efe5ecfa86b11aeb92d1875f4261
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.8.0 pkginfo/1.10.0 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.20 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
|
Security for inhibitor-tool 5.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.