Skip to main content

A python library for interacting with Pokémon Showdown

Project description

pslib

Build Status PyPI PyPI - Python Version

A python library for interacting with Pokémon Showdown.

🚧 Work in progress 🚧

import asyncio
import pslib

async def join_battles(client):
    while True:
        for battle in await client.query_battles():
            await battle.join()

async def display_logs(client):
    async for message in client.listen(pslib.WinMessage, all_rooms=True):
        print(message.room.logs)
        await message.room.leave()

async def main():
    async with pslib.connect() as client:
        await asyncio.gather(join_battles(client), display_logs(client))

asyncio.run(main())

Installation

The package can be installed with pip.

$ pip install pslib

License - MIT

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

pslib-0.0.4.tar.gz (8.5 kB view hashes)

Uploaded Source

Built Distribution

pslib-0.0.4-py3-none-any.whl (10.2 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