Skip to content

joenap/lazynet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

85 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lazynet

Are you lazy? Do you need to make lots of HTTP requests?

Well, look no further. lazynet is for you!

lazynet performs lazy-evaluated, asynchronous HTTP requests. It is ideal for making many HTTP requests for data at rest, fast and efficiently in a functional manner.

It uses the asyncio and aiohttp libraries, using coroutines under the hood. It also hides this complexity from you, keeping you in a synchronous mindset.

Usage

import lazynet

# This is a generator
urls = (f'https://my.domain/object/{id}' for id in range(10))

# responses is also a generator
responses = lazynet.get(urls)

# nothing is evaluated until this loop
for response in responses:
    print(response)

Performance

lazynet can currently achieve a rate of about 1300 requests per second.

About

Lazy-evaluated HTTP requests

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •