Lowlevel but easy-to-use wrapper over the Discord gateway
Project description
Wumpy-gateway
Gateway implementation for the Wumpy project.
Installation
Wumpy-gateway is available as a package on PyPI. Just use your favourite package manager such as pip or Poetry:
# Installing from PyPI using pip:
pip install wumpy-gateway
# Alternatively, using Poetry:
poetry add wumpy-gateway
Quickstart
The API of wumpy-gateway is very simple:
from wumpy.gateway import Shard
INTENTS = 65535
TOKEN = 'ABC123.XYZ789'
async def main():
# Connect to the URI wss://gateway.discord.gg/ with the token
# ABC123.XYZ8789 and all intents.
async with Shard('wss://gateway.discord.gg/', TOKEN, INTENTS) as ws:
async for event in ws:
print(event) # The deserialized JSON event payload
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
wumpy-gateway-0.3.0.tar.gz
(10.6 kB
view hashes)
Built Distribution
Close
Hashes for wumpy_gateway-0.3.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c8b13d34d4df3b83afb7c7d80a952216cb58348587db5262395ce340a2a8a53 |
|
MD5 | 6d75ed6a4c40287e0e167629a9969fd4 |
|
BLAKE2b-256 | 3a0abe8a784848d1129aedc47970214fdc04f525e6b72c8878ae29ca6a1995cf |