golem-examples 1.1.1

Golem example templates
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
state: int = 0

from binding.pack_name import exports
# Example common lib import
# from lib import example_common_function

class ComponentNameApi(exports.ComponentNameApi):
    def add(self, value: int):
        global state
        print("add " + str(value))
        state = state + value

    def get(self) -> int:
        global state
        print("get")
        return state