Developing Lightshows - Yottabits/102shows GitHub Wiki

102shows version: 0.2

an example at the beginning

a lightweight example is lightshows/solidcolor.py

formal interface

  • any show should reside in its own file (aka module) under server/lightshows/
    for example myshow.py

  • the module must be registered in the list __all__ in lightshows/__init__.py
    for example:

__all__ = ['foo', 'bar', 'myshow']
  • all lightshows should inherit the basic lightshow template under lightshows/templates/base.py
    for example:
from lightshows.templates.base import *

def MyShow(Lightshow):
    def run(self):
        ...

    def check_runnable(self):
        ...
    
    def set_parameter(self):
        ...
  • it must be registered under shows in the config.py file
    for example:
configuration.shows('MyShow') = myshow.MyShow

class parameters

Other templates

ColorCycle