Skip to main content

An ultra small Discord webhook handler

Project description

Pywebhk

Pywebhk (pronounced Py-webhook) is an ultra-small Discord webhook handler that allows you to create webhook messages quickly and easily. It provides a simple-to-use interface with methods and classes for handling webhooks.

license python discord-webhook-handler

Features

  • Create and send webhook messages with ease.
  • Support for embedding rich content in your messages.
  • Lightweight and easy to integrate into your projects.
  • Compatible with Python 3.6 and above.

Installation

You can install Pywebhk using pip:

pip install pywebhk

Usage Example

from pywebhk.webhook import Webhook
from pywebhk.embed import Embed

webhook_url = "WEBHOOK_URL"
hook = Webhook(webhook_url)

hook.set_content("Hello from main.py!")
hook.set_name("My Webhook")
hook.set_avatar("https://example.com/avatar.png")

embed = Embed(title="My Cool Embed", description="This is a sample embed from main.py.", color=0xFF5733)
embed.set_author(name="Author Name", icon_url="https://example.com/author.png")
embed.add_field(name="Field A", value="Value A", inline=False)
embed.add_field(name="Field B", value="Value B", inline=True)
embed.set_footer(text="Footer text from a really cool embed")

hook.add_embed(embed)

try:
    hook.send()
    print("Webhook message sent successfully from main.py!")
except Exception as e:
    print("Error sending webhook message from main.py:", e)

TODO

  • Add File Support
  • Some Error Handling Done
  • Minor Documentation Done

License

This project is licensed under the MIT License.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywebhk-1.0.5.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

pywebhk-1.0.5-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file pywebhk-1.0.5.tar.gz.

File metadata

  • Download URL: pywebhk-1.0.5.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pywebhk-1.0.5.tar.gz
Algorithm Hash digest
SHA256 b8d92d94d9400674859c54aa787bfc6bb9679306003ac74b34323eb8977ff363
MD5 3d7ca8877dff41e4082c6e94967cc5e7
BLAKE2b-256 dd5ea54ab81c1845d598bad1308bab72698af534a7a37a31bfa740065c7ae28c

See more details on using hashes here.

File details

Details for the file pywebhk-1.0.5-py3-none-any.whl.

File metadata

  • Download URL: pywebhk-1.0.5-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.4

File hashes

Hashes for pywebhk-1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 66daed14f150d6d0de925c5f669bf1c3cd23ec5167a3e9ecf47d56cbb18d74f0
MD5 d5f6b7be8ba8d7a94b7072c9bbd28412
BLAKE2b-256 3a6411ac75472abc874f9c7c9365b8295d7ef1a7000bdf52b2391770fe14ee98

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page