Skip to content

mab4058/aiohttpmap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyPI

Aiohttpmap

Bulk asynchronous processing of URLs using the aiohttp package.

Installation

pip install aiohttpmap

Example

import asyncio
from aiohttpmap import AiohttpMap

urls = ['https://api.-placeholder-.com/endpoint']*10

loop = asyncio.get_event_loop()
try:
    results = loop.run_until_complete(AiohttpMap().map(urls, request_type='get'))
finally:
    loop.close()

Example with authentication header.

import asyncio
from aiohttpmap import AiohttpMap

urls = ['https://api.-placeholder-.com/endpoint']*10
auth_header = {'Authorization': 'token...'}

loop = asyncio.get_event_loop()
try:
    results = loop.run_until_complete(AiohttpMap().map(urls, request_type='get', headers=auth_header))
finally:
    loop.close()

About

Bulk http request handling using aiohttp.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages