Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #6
0
def byebye(input: ByebyeInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.byebye(**input.dict())
        return s.dict()
Beispiel #7
0
def hello(input: HelloInput) -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello(**input.dict())
        return s.dict()
Beispiel #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()
Beispiel #9
0
def byebye() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.byebye()
        return s.dict()
Beispiel #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()
Beispiel #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()
Beispiel #12
0
def cleanup_db() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.cleanup_db()
    return s.dict()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #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()
Beispiel #17
0
def must_error() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.must_error()
    return s.dict()
Beispiel #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()
Beispiel #19
0
def hello() -> t.Dict[str, t.Any]:
    with runtime.handle() as s:
        commands.hello()
    return s.dict()