Skip to main content

AsyncPygame

Let's say you want to do:

  1. print('A')
  2. wait for 1000ms
  3. print('B')
  4. wait for a mouse button to be pressed
  5. print('C')

in that order. The asyncpygame module allows you to implement that like this:

async def what_you_want_to_do(*, clock, sdlevent, **kwargs):
    print('A')
    await clock.sleep(1000)
    print('B')
    e = await sdlevent.wait(MOUSEBUTTONDOWN)
    print('C')

Youtube
API Reference

Currently, there are no proper tutorials available. Please refer to the examples.

Installation

Pin the minor version.

poetry add asyncpygame@~0.1
pip install "asyncpygame>=0.1,<0.2"

Tested on

  • CPython 3.10 + pygame-ce 2.5
  • CPython 3.11 + pygame-ce 2.5
  • CPython 3.12 + pygame-ce 2.5

Metadata

Release files for asyncpygame 0.1.3

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

Source distribution (sdist)

Source distribution for asyncpygame 0.1.3
File Size Uploaded
asyncpygame-0.1.3.tar.gz 9.5 kB Details

Built distribution (wheel)

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

Total release size: 20.5 kB

Release files / asyncpygame-0.1.3.tar.gz

Download URL asyncpygame-0.1.3.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
83a521b8d5b76cebbe6c8ee63f485870e850973494808f9cbb1f58fe4f6d547c
BLAKE2b-256 checksum
How to use checksums
47a0cfbcb93e490e56c2b1e45f415b922082588144e2d64f519082bc56a01902
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.4.0-198-generic

Release files / asyncpygame-0.1.3-py3-none-any.whl

Download URL asyncpygame-0.1.3-py3-none-any.whl
Size 11.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
485f8eefbab2dd382d188fd583b6dcfe0cfd109be4f3bb30c29af1bba3171dd0
BLAKE2b-256 checksum
How to use checksums
f2348879da4a9795cabd7a4bf1f758373dd00edc59269305a16993c20836be24
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.8.3 CPython/3.11.4 Linux/5.4.0-198-generic

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

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