Registry / devops / sprig-essentials

sprig-essentials

JSON →
library0.5.0pypypi✓ verified 80d ago

Simplifying the process of creating games and apps for the Sprig. Currently at v0.5.0, under active development with regular releases.

pip install sprig-essentials
INSTALL
IMPORT
SIG · SPRIG-ESSENTIALS
S
sprig-essentials
devopspythonv0.5.0
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Sprite
import sprig_essentials
from sprig_essentials import Sprite

Initialize a game, create a sprite, add a button, and run the game loop.

from sprig_essentials import Sprite, Game, Button game = Game() sprite = Sprite('path_to_image.png', x=50, y=50) game.add_sprite(sprite) button = Button('A', lambda: print('Pressed')) game.add_button(button) game.run()
Debug
Known issues
gotchaThe library is very early-stage (v0.5.0); APIs may change without notice. Pin your version.
fix
Use `pip install sprig-essentials==0.5.0` in requirements.
affects: <1.0.0
breakingIn v0.4.0, the Button class was introduced; in v0.5.0, the constructor signature changed. Users upgrading from v0.3.x may break.
fix
Update Button instantiation to match new signature: Button('A', lambda: print('Pressed')).
affects: 0.3.x -> 0.4.x+
deprecatedThe old `add_event_listener` method (if used) has been replaced with `add_button`. Check your code for any calls to `add_event_listener`.
fix
Replace `add_event_listener` with `add_button` and adjust parameters.
affects: <0.4.0
Upgrade
Version history
0.5.0latest on PyPI · released May 17, 2024
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources