Skip to main content

bareClient

An asyncio HTTP Python client package supporting HTTP versions 1.0, 1.1 and 2 (read the docs).

This is the client companion to the ASGI server side web framework bareASGI and follows the same "bare" approach. It provides only the essential functionality and makes little attempt to provide any helpful features which might do unnecessary work.

This package is suitable for:

  • A foundation for async HTTP/2 clients,
  • Async REST client API's,
  • Containers requiring a small image size,
  • Integration with ASGI web servers requiring async HTTP client access.

Features

The client has the following notable features:

  • Lightweight
  • Uses asyncio
  • Supports HTTP versions 1.0, 1.1, 2
  • Supports middleware

Installation

The package can be installed with pip.

pip install bareclient

This is a Python3.7 and later package.

It has dependencies on:

Usage

The basic usage is to create an HttpClient.

import asyncio
from typing import List, Optional
from bareclient import HttpClient

async def main(url: str) -> None:
    async with HttpClient(url) as response:
        if response.ok and response.more_body:
            async for part in response.body:
                print(part)

asyncio.run(main('https://docs.python.org/3/library/cgi.html'))

Metadata

Release files for bareclient 5.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bareclient 5.0.1
File Size Uploaded
bareclient-5.0.1.tar.gz 22.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for bareclient 5.0.1
File Interpreter ABI Platform
bareclient-5.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 51.1 kB

Release files / bareclient-5.0.1.tar.gz

Download URL bareclient-5.0.1.tar.gz
Size 22.1 kB
Tags Source
SHA-256 checksum
How to use checksums
ccfae9f5cb19a273a76a0b521dd371517757399dcb5c61f2f1b7c49ac00753ec
BLAKE2b-256 checksum
How to use checksums
af6b23268543c1698b07fb5ab4765fa8e2d0f11c28cd9a0037cfc6a009b8621e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.7 Darwin/19.6.0

Release files / bareclient-5.0.1-py3-none-any.whl

Download URL bareclient-5.0.1-py3-none-any.whl
Size 29.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a1e89260d383b249e5885065926d2307c4df92d44e10fb5c9bc77d8976582456
BLAKE2b-256 checksum
How to use checksums
fe0d539d30fa83937c541f6b42ebf5f10a576e0599dcdce4af9f49c58c59e8f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.1.8 CPython/3.9.7 Darwin/19.6.0
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page