Skip to main content

An extendable client for interacting with Pokemon Showdown

Project description


A client for Pokemon Showdown! for Python 3.5+. This was written to make it easier to write bots, interact with users, moderate chat rooms, and collect data.


Install the package with pip3 install --user showdownpy. This will also install the package's websockets and aiohttp dependencies if you do not already have them.


Examples have been provided in the ./examples directory. Make sure to create your own versions of the login.txt and owner.txt files in ./examples/data/ directory. Example files have been provided.

The client on its own doesn't do very much, and is instead intended to be extended and modified. This can be done through various "hooks" left in the base class. The following program uses the on_private_message hook to echo back the content of any PMs it receives.

import showdown
import logging

with open('./examples/data/login.txt', 'rt') as f:
    username, password =

class EchoClient(showdown.Client):
    async def on_private_message(self, pm):
        if pm.recipient == self:
            await pm.reply(pm.content)

EchoClient(name=username, password=password).start()

Other hooks include on_connect, on_login, on_room_init, on_room_deinit, on_query_response and on_chat_message.

These hooks are by no means all inclusive (Showdown has somewhere upwards of 40 different types of messages it uses to interact with clients), and so a catch-all hook on_receive is also present.

Project details

Download files

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

Files for showdownpy, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size showdownpy-0.1.0-py3-none-any.whl (22.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size showdownpy-0.1.0.tar.gz (19.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page