{"id":28273,"library":"sprig-essentials","title":"sprig-essentials","description":"Simplifying the process of creating games and apps for the Sprig. Currently at v0.5.0, under active development with regular releases.","status":"active","version":"0.5.0","language":"python","source_language":"en","source_url":"https://github.com/WhenLifeHandsYouLemons/sprig_essentials","tags":["game-dev","sprig","arcade","education"],"install":[{"cmd":"pip install sprig-essentials","lang":"bash","label":"Install from PyPI"}],"dependencies":[],"imports":[{"note":"Main class for creating sprite objects","symbol":"Sprite","correct":"from sprig_essentials import Sprite"},{"note":"Main class for game loop and setup","symbol":"Game","correct":"from sprig_essentials import Game"},{"note":"Class for handling button inputs","symbol":"Button","correct":"from sprig_essentials import Button"}],"quickstart":{"code":"from sprig_essentials import Sprite, Game, Button\ngame = Game()\nsprite = Sprite('path_to_image.png', x=50, y=50)\ngame.add_sprite(sprite)\nbutton = Button('A', lambda: print('Pressed'))\ngame.add_button(button)\ngame.run()","lang":"python","description":"Initialize a game, create a sprite, add a button, and run the game loop."},"warnings":[{"fix":"Use `pip install sprig-essentials==0.5.0` in requirements.","message":"The library is very early-stage (v0.5.0); APIs may change without notice. Pin your version.","severity":"gotcha","affected_versions":"<1.0.0"},{"fix":"Update Button instantiation to match new signature: Button('A', lambda: print('Pressed')).","message":"In v0.4.0, the Button class was introduced; in v0.5.0, the constructor signature changed. Users upgrading from v0.3.x may break.","severity":"breaking","affected_versions":"0.3.x -> 0.4.x+"},{"fix":"Replace `add_event_listener` with `add_button` and adjust parameters.","message":"The old `add_event_listener` method (if used) has been replaced with `add_button`. Check your code for any calls to `add_event_listener`.","severity":"deprecated","affected_versions":"<0.4.0"}],"env_vars":null,"last_verified":"2026-05-09T00:00:00.000Z","next_check":"2026-08-07T00:00:00.000Z","problems":[{"fix":"Run `pip install sprig-essentials`. Note: import uses underscores, not hyphens.","cause":"Library not installed or misspelled (hyphen vs underscore).","error":"ModuleNotFoundError: No module named 'sprig_essentials'"},{"fix":"Upgrade to latest version: `pip install sprig-essentials --upgrade`. Then use `from sprig_essentials import Sprite`.","cause":"Old version installed that did not export Sprite; or wrong import path.","error":"AttributeError: module 'sprig_essentials' has no attribute 'Sprite'"},{"fix":"Use new signature: `Button(name, callback)` with exactly 2 arguments before `self`? Actually current signature is `Button(name, on_press)`. Check docs.","cause":"Attempting to instantiate Button with old positional arguments (e.g., without callback).","error":"TypeError: __init__() takes 1 positional argument but 3 were given"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}