Photons
  • The approach taken by Photons
  • Installation
  • Photons from the command line
    • References from the command line
    • Common tasks with the CLI
  • Writing Scripts
    • Using the library_setup function
    • Registering a Photons task
    • Photons Task Class
    • Logging with Photons
  • The Collector
  • Photons Configuration files
    • Device Discovery
  • Interacting with LIFX devices
    • The Sender Interface
    • The Gatherer Interface
    • LIFX Binary Protocol
    • Special Message objects
    • Special Reference Objects
    • The Device Finder
  • Useful Helpers
    • Working with Colour
    • Working with Tile orientation
    • Working with Async code
    • Other things to make your life easier
  • The Product Registry
    • Available Capabilities
    • LIFX Products
  • Tile Animations
    • Starting animations from the Command Line
    • Building your own animations
  • Photons Applications
    • Tile arranger
    • Local daemon with HTTP API
      • Options for the Interactor
      • Running the Interactor from Docker
      • Home Assistant Addon
      • Changelog
  • Terms
  • ChangeLog
Photons
  • Useful Helpers
  • View page source

Useful Helpers

Photons comes with some helpful code to make it easier for you to make your scripts.

  • Working with Colour
    • ColourParser
      • ColourParser.hsbk()
      • ColourParser.msg()
    • Effects
      • Effects.pulse()
      • Effects.sine()
      • Effects.half_sine()
      • Effects.triangle()
      • Effects.saw()
      • Effects.breathe()
    • make_hsbk()
    • make_hsbks()
  • Working with Tile orientation
    • Orientation
      • Orientation.FaceDown
      • Orientation.FaceUp
      • Orientation.RightSideUp
      • Orientation.RotatedLeft
      • Orientation.RotatedRight
      • Orientation.UpsideDown
    • nearest_orientation()
    • reorient()
    • reverse_orientation()
    • rotated_index()
  • Working with Async code
    • Making tasks
      • async_as_background()
      • async_with_timeout()
    • Managing futures
      • wait_for_all_futures()
      • wait_for_first_future()
      • cancel_futures_and_wait()
    • Future callbacks
      • reporter()
      • silent_reporter()
      • transfer_result()
      • fut_has_callback()
    • Custom Future classes
      • ResettableFuture
      • ChildOfFuture
    • Objects for doing async work
      • ATicker
      • tick()
      • TaskHolder
        • TaskHolder.add()
        • TaskHolder.add_task()
        • TaskHolder.finish()
      • ResultStreamer
        • ResultStreamer.Result
        • ResultStreamer.add_generator()
        • ResultStreamer.add_coroutine()
        • ResultStreamer.add_value()
        • ResultStreamer.add_task()
        • ResultStreamer.no_more_work()
        • ResultStreamer.finish()
  • Other things to make your life easier
    • add_error()
    • a_temp_file()
    • nested_dict_retrieve()
    • memoized_property
Previous Next

© Copyright Stephen Moore.

Built with Sphinx using a theme provided by Read the Docs.