Metadata-Version: 2.4
Name: dchook
Version: 1.0.1
Summary: A lightweight Python library and CLI for sending messages through Discord webhooks.
Author: fmasterpro27
License-Expression: Apache-2.0
Project-URL: Homepage, https://github.com/Fmasterpro27/DCHook
Project-URL: Repository, https://github.com/Fmasterpro27/DCHook
Project-URL: Issues, https://github.com/Fmasterpro27/DCHook/issues
Keywords: discord,webhook,discord-webhook,notifications,cli,discord-bot
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Communications
Classifier: Topic :: Software Development :: Libraries
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: requests>=2.34.2
Dynamic: license-file

# DCHook

> A lightweight Python library and CLI for sending messages through Discord webhooks.

[![PyPI version](https://img.shields.io/pypi/v/dchook.svg)](https://pypi.org/project/dchook/)
[![Python versions](https://img.shields.io/pypi/pyversions/dchook.svg)](https://pypi.org/project/dchook/)
[![License](https://img.shields.io/pypi/l/dchook.svg)](LICENSE)

---

## 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

```bash
pip install dchook
```

---

## Quick Start

```python
from dchook import send

send(
    "YOUR_WEBHOOK_URL",
    "Hello from DCHook!"
)
```

---

## Python API

### Send a Message

```python
from dchook import send

send(
    "YOUR_WEBHOOK_URL",
    "Hello World!"
)
```

### Using the Webhook Class

```python
from dchook import Webhook

hook = Webhook("YOUR_WEBHOOK_URL")

hook.send("Hello World!")
hook.send("Another message!")
```

---

## CLI Usage

### Send a Message

```bash
dchook "Hello World!" -w YOUR_WEBHOOK_URL
```

### Using an Environment Variable

Linux/macOS:

```bash
export DCHOOK_WEBHOOK="YOUR_WEBHOOK_URL"

dchook "Hello World!"
```

Windows PowerShell:

```powershell
$env:DCHOOK_WEBHOOK="YOUR_WEBHOOK_URL"

dchook "Hello World!"
```

### Show Version

```bash
dchook --version
```

---

## Example

```python
from dchook import send

send(
    "https://discord.com/api/webhooks/...",
    "Deployment completed successfully."
)
```

---

## Testing

```bash
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.
