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 Provenance Actions
pslib-0.0.6.tar.gz 8.7 kB Without provenance Details for pslib-0.0.6.tar.gz

Built distribution (wheel)

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

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

Security for pslib 0.0.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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