Skip to main content

A Python 3 webhook module.

Project description

WhPy - Webhook Python

PyPI PyPI - License PyPI - Python Version PyPI - Downloads

Webhook Python is a Python 3 module for interacting with various chat applications via established webhooks.

Installation

pip install WhPy

SHA256 CHECKSUMS

61e9e7c854a1f903b4805304e0c9522d5eebf8973fe0c19631b01e84937d9e70  WhPy/discord.py
2004c330f131d71e4f3556f2ce3b737208403789a8e30314d67c702805b43def  WhPy/__init__.py
0f0724f3bf27c1ef85faffd75cf8bfe75bc6931ecd00aa8ca568a6761e3112d3  WhPy/slack.py

Code Examples

Hello, World!

from WhPy import discord

# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"

# Creates Discord Instance
hook = discord.Webhook(url=webhook_url)

# Sets Message Content
hook.message(content="Hello, World!")

# Executes the Webhook
hook.execute()

Hello, World! from user MichaelCduBois

from WhPy import discord

# Discord Webhook Parameters
webhook_channel_id = "1234"
webhook_token = "567890"

# Creates Discord Instance
hook = discord.Webhook(channel_id=webhook_channel_id, token=webhook_token)

# Sets Message Content as MichaelCduBois
hook.message(content="Hello, World!", username="MichaelCduBois")

#Executes the Webhook
hook.execute()

Hello, World! Text-to-Speech Message

from WhPy import discord

# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"

# Creats Discord Instance
hook = discord.webhook(url=webhook_url)

# Sets Message content as a Text-to-Speech Message
hook.message(content="Hello, World!", tts=True)

# Executes the Webhook
hook.execute()

Return message confirmation as JSON Object

from WhPy import discord

# Discord Webhook URL
webhook_url = "https://discordapp.com/api/webhooks/1234/567890"

# Creats Discord Instance
hook = discord.webhook(url=webhook_url)

# Sets Message Content
hook.message(content="Hello, World!")

# Executes the Webhook
hook.execute(wait=True)

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

WhPy-0.1.6.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

WhPy-0.1.6-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file WhPy-0.1.6.tar.gz.

File metadata

  • Download URL: WhPy-0.1.6.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for WhPy-0.1.6.tar.gz
Algorithm Hash digest
SHA256 9b1cac15e3af1e40cc2ac3f1662aa3f59b15dc4baf1c16983767454a85b6bed5
MD5 dfdc6d047b7cf7ea7b4d72011b003c40
BLAKE2b-256 a436e250416f0c7751467413ab8ec4e5e1edf796834ef44abfcdbd7817d3f1ec

See more details on using hashes here.

File details

Details for the file WhPy-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: WhPy-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for WhPy-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 1479b9fec8f1a89182f64da13d4727145734af0a68aad2ef0e03b9ab01c02c0a
MD5 413297fa7eb84b6e676f17dfa38133d0
BLAKE2b-256 d650ce90f836414d28e9304b306cf3654c815678d3326edc92dc75e0124fea71

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