Skip to main content

Perform lazy-evaluated HTTP requests

Project description

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.

History

2019: Alpha status. lazynet was developed as an experiment and proof of concept.

2023: Beta Status. Updated to use current asyncio interface.

Project details


Download files

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

Source Distribution

lazynet-0.3.0.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

lazynet-0.3.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file lazynet-0.3.0.tar.gz.

File metadata

  • Download URL: lazynet-0.3.0.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/21.6.0

File hashes

Hashes for lazynet-0.3.0.tar.gz
Algorithm Hash digest
SHA256 6c8f0e1d3178b7e6bdad54cd3782a70817eb08f5e09f5b2082d91ea16e00b59b
MD5 2d51089a5ca6122d3981e628545014a1
BLAKE2b-256 425f5e240feeea514a046e031739bf702705e5dfdd7a4d1723a2310773775e6e

See more details on using hashes here.

File details

Details for the file lazynet-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: lazynet-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.12.1 Darwin/21.6.0

File hashes

Hashes for lazynet-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1c7325940c2aac3462181040a46404e9ac0693a9ca4785f39424ac3fdae731a5
MD5 1130e36cd2b5c5d0f4a9da920ff9a3ce
BLAKE2b-256 de33633850649bea81b8f803f0130d8418fd1dc615246098d609d4cb8bddca90

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page