DCHook
A lightweight Python library and CLI for sending messages through Discord webhooks.
Features
- Send messages through Discord webhooks
- Simple Python API
- Command Line Interface (CLI)
- Lightweight and easy to use
- Minimal dependencies
- Fast and reliable
- Python 3.8+
Installation
pip install dchook
Quick Start
from dchook import send
send(
"YOUR_WEBHOOK_URL",
"Hello from DCHook!"
)
Python API
Send a Message
from dchook import send
send(
"YOUR_WEBHOOK_URL",
"Hello World!"
)
Using the Webhook Class
from dchook import Webhook
hook = Webhook("YOUR_WEBHOOK_URL")
hook.send("Hello World!")
hook.send("Another message!")
CLI Usage
Send a Message
dchook "Hello World!" -w YOUR_WEBHOOK_URL
Using an Environment Variable
Linux/macOS:
export DCHOOK_WEBHOOK="YOUR_WEBHOOK_URL"
dchook "Hello World!"
Windows PowerShell:
$env:DCHOOK_WEBHOOK="YOUR_WEBHOOK_URL"
dchook "Hello World!"
Show Version
dchook --version
Example
from dchook import send
send(
"https://discord.com/api/webhooks/...",
"Deployment completed successfully."
)
Testing
pytest
Requirements
- Python 3.8+
- requests
License
Apache License 2.0
Author
Developed by JackMa
GitHub: https://github.com/Fmasterpro27
Links
- Homepage: https://github.com/Fmasterpro27/DCHook
- Issues: https://github.com/Fmasterpro27/DCHook/issues
- PyPI: https://pypi.org/project/dchook/
License
Licensed under the Apache License 2.0.
Metadata
Release files for dchook 1.0.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 | Actions |
|---|---|---|---|---|
| dchook-1.0.1.tar.gz | 7.7 kB | Without provenance | Details for dchook-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| dchook-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for dchook-1.0.1-py3-none-any.whl |
Total release size: 15.8 kB
Release files / dchook-1.0.1.tar.gz
| Download URL | dchook-1.0.1.tar.gz |
|---|---|
| Size | 7.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
9ecb2d653a755faff1c70770ee6da34b194675e841e42115fe6834f80b9103a4
|
|
BLAKE2b-256 checksum How to use checksums |
8f6ac15f311647bc4773d9379993cd844804bc66f461cab399933ed9764b30d5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Release files / dchook-1.0.1-py3-none-any.whl
| Download URL | dchook-1.0.1-py3-none-any.whl |
|---|---|
| Size | 8.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
30d9a5dfdce422f6a2c00b985cbae92b7d11496c5bf5560f09cc96e8ed27fa6b
|
|
BLAKE2b-256 checksum How to use checksums |
49d0794d68390ff8f2bc0e059d4d5403d5e5cc748e06f37bae290fa741a0b57c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.13
|
Security for dchook 1.0.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.
To learn more about protecting yourself from malicious actors, visit our package security documentation.