예제 #1
0
class UserArguments(arguments.Container):
    COMPATIBLE_TYPE = User

    name = arguments.String(lambda self: self.input.name)
    age = arguments.Value(lambda self: self.input.age)
    location = arguments.String(lambda self: self.input.location)
    married = arguments.Boolean(lambda self: self.input.married)
예제 #2
0
class MOLArgument(BaseArgument):
    applies = True
    foo = arguments.Value(lambda self: 42)
예제 #3
0
class MyArguments(Container):
    variable1 = arguments.Value(lambda self: self.input)
    opposite_variable1 = arguments.Value(lambda self: not self.input)
    str_variable = arguments.String('prop')
예제 #4
0
class User(arguments.Container):
    name = arguments.String(lambda self: 'Jeff')
    age = arguments.Value(lambda self: 29)
    registered_on = arguments.Boolean(lambda self: True)