Skip to main content
Donate to the Python Software Foundation or Purchase a PyCharm License to Benefit the PSF! Donate Now

A lightweight network request framework

Project description


A lightweight network request framework based on requests & asyncio


pip install async_request


import async_request as ar

def parse_baidu(response):
    print(response.url, response.status_code)
    yield ar.Request('', callback=parse_bing)

def parse_bing(response):
    print(response.url, response.status_code)
    yield ar.Request('', callback=parse_github)

def parse_github(response):
    print(response.url, response.status_code)
    yield {'hello': 'github'}

def process_result(result):

request_list = [ar.Request(url='', callback=parse_baidu)]
ar.crawl(request_list, result_callback=process_result)

And you'll see the result like this: 200 200
javascript:void(0) 200
{'hello': 'github'}

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
async-request-0.155.tar.gz (3.7 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page