Skip to main content

Automatic aiohttp ClientSession management

Project description

A module to automatically manage aiohttp.ClientSession objects for you to improve performance.

The package manages a global cache of aiohttp.ClientSession objects based on the host a particular request is connecting to so connections can be reused between requests.

It also simplifies the API.

Usage

The usage is similar to the python requests library:

import aiohttp_client
async with aiohttp_client.get('http://www.google.com') as resp:
    # do something here

Configuration

Uses env variables to configure max number of reqeusts/sessions to manage:

  • AIOHTTP_SESSION_SIZE: max number of sessions to keep in cache(default 200)

  • AIOHTTP_SESSION_DNS_CACHE: number of seconds to keep dns lookup in cache(default 20)

  • AIOHTTP_SESSION_LIMIT: number of simultaneous connections to have per session(default 500)

1.1.2 (2022-10-20)

  • Change to bsd license

1.1.1 (2020-04-15)

  • better session connector defaults

1.1.0 (2019-06-06)

  • update max requests and sessions

  • Updated setup.py to point to aihttp_client.py

1.0.0 (2018-04-09)

  • initial release

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

aiohttp_client_manager-1.1.2.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

aiohttp_client_manager-1.1.2-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file aiohttp_client_manager-1.1.2.tar.gz.

File metadata

  • Download URL: aiohttp_client_manager-1.1.2.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

File hashes

Hashes for aiohttp_client_manager-1.1.2.tar.gz
Algorithm Hash digest
SHA256 42d9ac92b336869faaadf12d62a6fccc55518812261a085d7a4b8aa8e5ba7e9c
MD5 486f0a8e0c2ed210bd03d28e309efe82
BLAKE2b-256 9d7470413826cdd6f06d6db32d2b517e962bf7be68166005fcccbf763ee30451

See more details on using hashes here.

File details

Details for the file aiohttp_client_manager-1.1.2-py3-none-any.whl.

File metadata

  • Download URL: aiohttp_client_manager-1.1.2-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.6

File hashes

Hashes for aiohttp_client_manager-1.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0f6bad6d44e62e73b241173ec7f3af5f72e7d87c1f74550ee80fd1290051e6a0
MD5 6052208e576b49a04d704b93d0b99460
BLAKE2b-256 52bc1ed29bf07363354fb73e0a8623b3a77ecd15868611e880b8170f2b40e8ae

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