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_MAX_REQUESTS

  • AIOHTTP_SESSION_SIZE

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.0.tar.gz (2.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: aiohttp_client_manager-1.1.0.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/39.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for aiohttp_client_manager-1.1.0.tar.gz
Algorithm Hash digest
SHA256 4412a9f02b6da4d9635f810a15742db494f88ba113fabe10817c0eced24ae0ac
MD5 2b167bd12b9f903ab6e2ec7d577d8e4d
BLAKE2b-256 9462ed372477a1914f027e07bd8e4520e7a5f47320b84debbebdd7461d6a5314

See more details on using hashes here.

Supported by

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