bareclient


Namebareclient JSON
Version 5.0.1 PyPI version JSON
download
home_pagehttps://github.com/rob-blackbourn/bareClient
SummaryA lightweight asyncio HTTP client
upload_time2021-10-25 09:05:58
maintainer
docs_urlNone
authorRob Blackbourn
requires_python>=3.7,<4.0
licenseApache-2.0
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # bareClient

An asyncio HTTP Python client package supporting HTTP versions 1.0, 1.1
and 2 (read the [docs](https://rob-blackbourn.github.io/bareClient/)).

This is the client companion to the ASGI server side web framework
[bareASGI](https://github.com/rob-blackbourn/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.

```bash
pip install bareclient
```

This is a Python3.7 and later package.

It has dependencies on:

- [bareUtils](https://github.com/rob-blackbourn/bareUtils)
- [h11](https://github.com/python-hyper/h11)
- [h2](https://github.com/python-hyper/hyper-h2)

## Usage

The basic usage is to create an `HttpClient`.

```python
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'))
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/rob-blackbourn/bareClient",
    "name": "bareclient",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7,<4.0",
    "maintainer_email": "",
    "keywords": "",
    "author": "Rob Blackbourn",
    "author_email": "rob.blackbourn@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/af/6b/23268543c1698b07fb5ab4765fa8e2d0f11c28cd9a0037cfc6a009b8621e/bareclient-5.0.1.tar.gz",
    "platform": "",
    "description": "# bareClient\n\nAn asyncio HTTP Python client package supporting HTTP versions 1.0, 1.1\nand 2 (read the [docs](https://rob-blackbourn.github.io/bareClient/)).\n\nThis is the client companion to the ASGI server side web framework\n[bareASGI](https://github.com/rob-blackbourn/bareASGI) and follows the same\n\"bare\" approach. It provides only the essential functionality and makes little\nattempt to provide any helpful features which might do unnecessary work.\n\nThis package is suitable for:\n\n- A foundation for async HTTP/2 clients,\n- Async REST client API's,\n- Containers requiring a small image size,\n- Integration with ASGI web servers requiring async HTTP client access.\n\n## Features\n\nThe client has the following notable features:\n\n- Lightweight\n- Uses asyncio\n- Supports HTTP versions 1.0, 1.1, 2\n- Supports middleware\n\n## Installation\n\nThe package can be installed with pip.\n\n```bash\npip install bareclient\n```\n\nThis is a Python3.7 and later package.\n\nIt has dependencies on:\n\n- [bareUtils](https://github.com/rob-blackbourn/bareUtils)\n- [h11](https://github.com/python-hyper/h11)\n- [h2](https://github.com/python-hyper/hyper-h2)\n\n## Usage\n\nThe basic usage is to create an `HttpClient`.\n\n```python\nimport asyncio\nfrom typing import List, Optional\nfrom bareclient import HttpClient\n\nasync def main(url: str) -> None:\n    async with HttpClient(url) as response:\n        if response.ok and response.more_body:\n            async for part in response.body:\n                print(part)\n\nasyncio.run(main('https://docs.python.org/3/library/cgi.html'))\n```\n",
    "bugtrack_url": null,
    "license": "Apache-2.0",
    "summary": "A lightweight asyncio HTTP client",
    "version": "5.0.1",
    "project_urls": {
        "Homepage": "https://github.com/rob-blackbourn/bareClient",
        "Repository": "https://github.com/rob-blackbourn/bareClient"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "fe0d539d30fa83937c541f6b42ebf5f10a576e0599dcdce4af9f49c58c59e8f2",
                "md5": "2dd1e571577c2083c90f8efe82dd7dac",
                "sha256": "a1e89260d383b249e5885065926d2307c4df92d44e10fb5c9bc77d8976582456"
            },
            "downloads": -1,
            "filename": "bareclient-5.0.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "2dd1e571577c2083c90f8efe82dd7dac",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7,<4.0",
            "size": 28960,
            "upload_time": "2021-10-25T09:05:54",
            "upload_time_iso_8601": "2021-10-25T09:05:54.692986Z",
            "url": "https://files.pythonhosted.org/packages/fe/0d/539d30fa83937c541f6b42ebf5f10a576e0599dcdce4af9f49c58c59e8f2/bareclient-5.0.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "af6b23268543c1698b07fb5ab4765fa8e2d0f11c28cd9a0037cfc6a009b8621e",
                "md5": "43aab75cf7357229597b3321014d435d",
                "sha256": "ccfae9f5cb19a273a76a0b521dd371517757399dcb5c61f2f1b7c49ac00753ec"
            },
            "downloads": -1,
            "filename": "bareclient-5.0.1.tar.gz",
            "has_sig": false,
            "md5_digest": "43aab75cf7357229597b3321014d435d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7,<4.0",
            "size": 22105,
            "upload_time": "2021-10-25T09:05:58",
            "upload_time_iso_8601": "2021-10-25T09:05:58.117745Z",
            "url": "https://files.pythonhosted.org/packages/af/6b/23268543c1698b07fb5ab4765fa8e2d0f11c28cd9a0037cfc6a009b8621e/bareclient-5.0.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-10-25 09:05:58",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rob-blackbourn",
    "github_project": "bareClient",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "bareclient"
}
        
Elapsed time: 0.18286s