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
  • 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.2.tar.gz (5.4 kB view details)

Uploaded Source

Built Distribution

pywebhk-1.0.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pywebhk-1.0.2.tar.gz
  • Upload date:
  • Size: 5.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.2.tar.gz
Algorithm Hash digest
SHA256 1afeaf0a795c66d7a21a35023a725be6e290c22724b415e0fc3dbb4202c05846
MD5 07ada653dbe0d53e636186c140cec561
BLAKE2b-256 b008eb43d3b9854c8a21c06eeac189c9ba238da9369cc3d6d54aa3eacba85bab

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pywebhk-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 6.3 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5f8346fdbb2e277a7c8570658eceedcdff264b3736a606a2933c04b34fd296b0
MD5 ee584f89f85fab259a6d0417a5685142
BLAKE2b-256 8133a2c4e5e6a16345c66ab814f0a3410752a99198bc23521f61ba5892a652cc

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