Did I find the right examples for you? yes no

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/e/l/eliot-0.3.0/benchmarks/serialization.py   eliot(Download)
import time
 
from eliot import Logger, MessageType, Field, ActionType
 
def _ascii(s):
    return s.decode("ascii")
 
 
F1 = Field.forTypes("integer", [int], "")
F2 = Field("string", _ascii, "")
F1 = Field.forTypes("integer", [int], "")
F2 = Field("string", _ascii, "")
F3 = Field("string2", _ascii, "")
F4 = Field.forTypes("list", [list], "list of integers")
 
M = MessageType("system:message", [F1, F2, F3, F4], "description")