Ejemplo n.º 1
0
def hello(input: Hello) -> t.Dict[str, t.Any]:
    """
    hello world
    """
    with runtime.handle() as s:
        commands.hello(**input.dict())
        return s.dict()
Ejemplo n.º 2
0
def hello(
        input: HelloInput,
        writer: commands.Writer = Depends(commands.writer),  # TODO: more deps?
) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello(writer, **input.dict())
        return s.dict()
Ejemplo n.º 3
0
def init(engine: sqlalchemy.engine.base.Engine = Depends(engine)) -> t.Dict[
        str, t.Any]:
    """
     init tables
    """
    with runtime.handle() as s:
        cli.init(engine)
    return s.dict()
Ejemplo n.º 4
0
def hello(input: HelloInput) -> t.Dict[str, t.Any]:
    """
    hello world
    """
    with runtime.handle() as s:
        # TODO: support positional arguments? (DI)
        n12web_commands.hello(**input.dict())
        return s.dict()
Ejemplo n.º 5
0
async def add(
    input: AddInput, db: databases.core.Database = Depends(db)
) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        await cli.add(db, **input.dict())
    return s.dict()
Ejemplo n.º 6
0
def byebye(input: ByebyeInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.byebye(**input.dict())
        return s.dict()
Ejemplo n.º 7
0
def hello(input: HelloInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello(**input.dict())
        return s.dict()
Ejemplo n.º 8
0
async def hello() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        await cli.hello()  # TODO: support positional arguments?
        return s.dict()
Ejemplo n.º 9
0
def byebye() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.byebye()
        return s.dict()
Ejemplo n.º 10
0
def byebye(
    input: ByebyeInput, db: commands.DB = Depends(db)) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        # TODO: support positional arguments? (DI)
        commands.byebye(db, **input.dict())
        return s.dict()
Ejemplo n.º 11
0
async def list(db: databases.core.Database = Depends(db)) -> t.Dict[str,
                                                                    t.Any]:
    with runtime.handle() as s:
        await cli.list(db)
    return s.dict()
Ejemplo n.º 12
0
def cleanup_db() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.cleanup_db()
    return s.dict()
Ejemplo n.º 13
0
def hello(input: HelloInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        cli.hello(**input.dict())  # TODO: support positional arguments?
        return s.dict()
Ejemplo n.º 14
0
def byebye(db: commands.DB = Depends(db)) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.byebye(db)
    return s.dict()
Ejemplo n.º 15
0
def hello(
    input: HelloInput, db: commands.DB = Depends(db)) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello(db, **input.dict())
    return s.dict()
Ejemplo n.º 16
0
def hello(input: HelloInput, db: DB = Depends(db)) -> t.Dict[str, t.Any]:
    with web.handle() as s:
        db.save("hello message")
        return s.dict()
Ejemplo n.º 17
0
def must_error() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.must_error()
    return s.dict()
Ejemplo n.º 18
0
def bye(input: ByeInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        cli.bye(**input.dict())  # TODO: support positional arguments?
        return s.dict()
Ejemplo n.º 19
0
def hello() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello()
    return s.dict()