Ejemplo n.º 1
0
def main():

    from wsgiref import simple_server

    from sakuya.model import session

    session.initialize('sqlite:///data.db')

    app = app_factory()

    simple_server.make_server('', 8888, app).serve_forever()
Ejemplo n.º 2
0
def main(args=sys.argv[1:]):

    parser = make_parser()

    opts = parser.parse_args(args)

    rtype = opts.types[-1]
    args = opts.types[:-1]

    session.initialize("sqlite:///" + opts.dbfile)

    with session.Session() as sess:
        results = functions.search_by_type(sess, rtype, args)
        output.print_result(results, opts)
Ejemplo n.º 3
0
def main(args=sys.argv[1:]):

    parser = make_parser()

    opts = parser.parse_args(args)

    rtype = opts.types[-1]
    args = opts.types[:-1]

    session.initialize('sqlite:///' + opts.dbfile)

    with session.Session() as sess:
        results = functions.search_by_type(sess, rtype, args)
        output.print_result(results, opts)