Ejemplo n.º 1
0
def index2 ():
    def respond (was, rss):
            return was.response.API (status_code = [rs.status_code for rs in rss.dispatch ()], a = rss.a)
    reqs = [
        was.get ("@pypi/project/rs4/", headers = {"Accept": "*/*"}),
    ]
    return was.Tasks (reqs, a = 100).then (respond)
Ejemplo n.º 2
0
    def index4 (was):
        def respond (was, rss):
            return str (rss [0].one ())

        reqs = [
            the_was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('---',))
        ]
        return the_was.Tasks (reqs).then (respond)
Ejemplo n.º 3
0
    def index (was):
        def respond (was, rss):
            return the_was.response.API (status_code = [rs.status_code for rs in rss.dispatch ()], a = rss.a)

        reqs = [
            the_was.get ("@pypi/project/skitai/"),
            the_was.get ("@pypi/project/rs4/"),
            the_was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return the_was.Tasks (reqs, a = 100).then (respond)
Ejemplo n.º 4
0
    def index3 (was):
        def respond (was, rss):
            datas = str (rss [0].fetch ()) + str (rss [1].one ())
            return datas

        reqs = [
            the_was.get ("@pypi/project/rs4/"),
            the_was.backend ("@sqlite").execute ('SELECT * FROM stocks WHERE symbol=?', ('RHAT',))
        ]
        return the_was.Tasks (reqs).then (respond)
Ejemplo n.º 5
0
def index ():
    reqs = [
        was.get ("@pypi/project/rs4/", headers = {"Accept": "*/*"}),
    ]
    tasks = was.Tasks (reqs).fetch ()
    return str (tasks)
Ejemplo n.º 6
0
 def index12 (was):
     a = the_was.Tasks ([was.backend ("@sqlite").execute ('SELECT symbol FROM stocks WHERE symbol=? limit 1', ('RHAT',))])
     b = the_was.Tasks ([was.backend ("@sqlite").execute ('SELECT symbol FROM stocks WHERE symbol=? limit 1', ('RHAT',))])
     a.add (b)
     return str (a.one ())