Skip to main content

World Model Kit

Project description

World Model Kit

PyPI Tests

World Model Kit (WMK) is a comprehensive toolkit designed to streamline the development, deployment, and operation of interactive world models.

Key Features

  • High-Performance Rendering Native system integration for efficient real-time visualization of world model outputs, optimized for various display environments.

  • Interactive User Interface Comprehensive input processing system with support for keyboard and mouse interactions, event handling, and real-time response capabilities.

  • Extensible Architecture Built on top of Pyglet, enabling easy creation of custom window classes, event handlers, and graphics components.

  • Advanced Communication Layer Robust inter-process communication system featuring seamless integration with web clients and flexible message passing capabilities.

Installation

pip install wmk

Usage

Example of using the Player and Messenger modules to create a simple interactive application with a world model frame generator:

   from wmk.player import Player
   from wmk.messenger import Messenger

   is_user_connected = False

   def handle_user_connection(message):
       nonlocal is_user_connected
       is_user_connected = True if message["type"] == "connected" else False

   messenger = Messenger("/tmp/server.sock", "/tmp/client.sock")
   messenger.add_listener("connected", handle_user_connection)
   messenger.add_listener("disconnected", handle_user_connection)
   
   def frame_generator(window, dt):
       # Generate and return your frame here
       return frame if is_user_connected else empty_frame

   player = Player(frame_generator)
   player.run()

   messenger.start()

Development

To contribute to this library, first checkout the code. Then create a new virtual environment:

cd wmk
python -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

python -m pip install -e '.'

To run the tests:

python -m pytest

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

wmk-0.18.tar.gz (34.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

wmk-0.18-py3-none-any.whl (31.7 kB view details)

Uploaded Python 3

File details

Details for the file wmk-0.18.tar.gz.

File metadata

  • Download URL: wmk-0.18.tar.gz
  • Upload date:
  • Size: 34.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for wmk-0.18.tar.gz
Algorithm Hash digest
SHA256 9bdb7933599c9d8d93f2ecfb7a5cd7a58b4b95bf0680e0a9fd9f2385efc2481a
MD5 68c0825e0cbaa5dbefa910e02bbd224e
BLAKE2b-256 31ce7965e4a3d39792e3b1b4da1e7749228eee613f26b260bcbd19b1f3e098fd

See more details on using hashes here.

Provenance

The following attestation bundles were made for wmk-0.18.tar.gz:

Publisher: publish.yml on journee-live/wmk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file wmk-0.18-py3-none-any.whl.

File metadata

  • Download URL: wmk-0.18-py3-none-any.whl
  • Upload date:
  • Size: 31.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for wmk-0.18-py3-none-any.whl
Algorithm Hash digest
SHA256 5808d75d85ec47a45094d7db7c56a1e93114a186fcd7b48074fed2205c5e0f10
MD5 37cfa4f2e7aa8003b0439406663e0c1b
BLAKE2b-256 ced7a74fae7d36ce778f456e8a8d0fd680c4629e93ded598464ad1ad7795f14d

See more details on using hashes here.

Provenance

The following attestation bundles were made for wmk-0.18-py3-none-any.whl:

Publisher: publish.yml on journee-live/wmk

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page