Skip to main content

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)

Uploaded Source

Built Distribution

wumpy_gateway-0.3.0-py3-none-any.whl (11.4 kB view hashes)

Uploaded Python 3

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