#!/usr/bin/env python3

import altera_python_functions as backend


def on_read():
    backend.write_json({"value": backend.in_action_payload})


def on_list():
    backend.write_json({"actions": ["list", "read"]})


backend.message_loop_backend4(on_read=on_read, on_list=on_list)
