Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.2 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Internet > HTTP (WWW)

    Gale 0.0.9

    Download button

    No screenshots available
    Downloads: 59  Tell us about an update
    User Rating:
    Rated by:
    NOT RATED
    0 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    simpx | More programs
    BSD License / FREE
    September 26th, 2012, 05:58 GMT
    ROOT / Internet / HTTP (WWW)

     Read user reviews (0)  Refer to a friend  Subscribe

    Gale description

    Gale is just Tornado, written in Python

    Gale is an utility for the Tornado Asynchrous HTTP client.

    Installation

    pip install gale

    Asynchrous HTTP Request

    ###Get
     import gale
     def handle(response):
     print response.body
     gale.stop()

     gale.get('http://httpbin.org/ip', callback=handle)
     gale.start()
    ###Post
     gale.post('http://httpbin.org/post', data={'a':1}, callback=handle)
     gale.start()
    ###Proxy and Cookies
     gale.get('http://httpbin.org/get',
     params={'a':1, 'b':2},
     proxy='user:pass@8.8.8.8:80',
     cookies={'token': 'asdfgh'}, callback=handle)
     gale.start()
    ###Sleep
     def do_after_3_seconds():
     print 'hello'
     gale.stop()
     gale.sleep(3, callback=do_after_3_second)
     gale.start()


    Task

     def all_done():
     print 'all requests complete!'
     gale.stop()

     task = gale.Task()
     task.add(gale.get, 'http://httpbin.org/ip', callback=handle)
     task.add(gale.get, 'http://httpbin.org/get', callback=handle)
     task.add(gale.post, 'http://httpbin.org/post', data={'a': 1},
     callback=handle)
     #or you can patch the gale.get function
     #get = task.patch(gale.get)
     #get('http://httpbin.org/ip', callback=handle)
     #get('http://httpbin.org/get', callback=handle)
     #get('http://httpbin.org/post', data={'a': 1},
     # callback=handle)

     task.run(all_done)
     gale.start()



    Product's homepage

    Requirements:

    · Python
    · Tornado

      


    TAGS:

    Tornado client | asynchrous HTTP | asynchrous client | Tornado | asynchrous | HTTP

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM