Mohamed Feddad

67%
Flag icon
import asyncio import aiohttp from time import time   sites = [     "http://news.ycombinator.com/",     "https://www.yahoo.com/",     "http://www.aliexpress.com/",     "http://deelay.me/5000/http://deelay.me/", ]     async def find_size(session, url):     async with session.get(url) as response:         page = await response.read()         return len(page)     async def show_size(session, url):     size = await find_size(session, url)     print("Read {:8d} chars from {}".format(size, url))     async def main(loop):     async with aiohttp.ClientSession() as session:         tasks = []        ...more
Mohamed Feddad
Clean example of async client
Django Design Patterns and Best Practices: Industry-standard web development techniques and solutions using Python, 2nd Edition
Rate this book
Clear rating