Skip to main content

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():
            try:
                await battle.join()
            except pslib.JoiningRoomFailed:
                pass

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

Metadata

Release files for pslib 0.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pslib 0.0.6
File Size Uploaded
pslib-0.0.6.tar.gz 8.7 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pslib 0.0.6
File Interpreter ABI Platform
pslib-0.0.6-py3-none-any.whl Python 3 none any Details

Total release size: 19.4 kB

Release files / pslib-0.0.6.tar.gz

Download URL pslib-0.0.6.tar.gz
Size 8.7 kB
Tags Source
SHA-256 checksum
How to use checksums
22a27141870b74ab00085fbbc3b396f74d23c0d5ddab6e1bd3f15047f44412e3
BLAKE2b-256 checksum
How to use checksums
7c7f744800fd5ae5fc98f998de003a7020114c1c2e52c4e6201349337d0dd5a7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.0 Linux/4.15.0-1028-gcp

Release files / pslib-0.0.6-py3-none-any.whl

Download URL pslib-0.0.6-py3-none-any.whl
Size 10.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
90426eb14429e0768248d21cfac1a99ec58b1bf68f75e8c396d21a7658a71322
BLAKE2b-256 checksum
How to use checksums
f4ea5ac37fabf8fe537ad762fc714c1b5bddf1ed45033ae467536a9b0129e68a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.0.5 CPython/3.8.0 Linux/4.15.0-1028-gcp

Release history Release notifications | RSS feed

This release

0.0.6 This release

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page