aiocapsule


Nameaiocapsule JSON
Version 0.0.2 PyPI version JSON
download
home_pagehttps://github.com/woncoh1/aiocapsule
SummarySimple wrapper for AIOHTTP client session, request and response
upload_time2023-07-21 00:25:25
maintainer
docs_urlNone
authorwoncoh1
requires_python>=3.7
licenseApache Software License 2.0
keywords nbdev jupyter notebook python
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # aiocapsule

<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->

- A minimal package containing an AIOHTTP wrapper function
- Designed for asynchronous HTTP requests to *a large, unknown number of
  different servers*
- Support for HTTP proxy and basic authentication

## Install

``` sh
pip install aiocapsule
```

## How to use

``` python
from aiocapsule.core import request
```

A simple call returning JSON as a dict:

``` python
await request('GET', 'https://api.coingecko.com/api/v3/ping')
```

    {'gecko_says': '(V3) To the Moon!'}

Or a string of HTML:

``` python
await request('GET', 'https://example.com/', text=True)
```

    '<!doctype html>\n<html>\n<head>\n    <title>Example Domain</title>\n\n    <meta charset="utf-8" />\n    <meta http-equiv="Content-type" content="text/html; charset=utf-8" />\n    <meta name="viewport" content="width=device-width, initial-scale=1" />\n    <style type="text/css">\n    body {\n        background-color: #f0f0f2;\n        margin: 0;\n        padding: 0;\n        font-family: -apple-system, system-ui, BlinkMacSystemFont, "Segoe UI", "Open Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;\n        \n    }\n    div {\n        width: 600px;\n        margin: 5em auto;\n        padding: 2em;\n        background-color: #fdfdff;\n        border-radius: 0.5em;\n        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\n    }\n    a:link, a:visited {\n        color: #38488f;\n        text-decoration: none;\n    }\n    @media (max-width: 700px) {\n        div {\n            margin: 0 auto;\n            width: auto;\n        }\n    }\n    </style>    \n</head>\n\n<body>\n<div>\n    <h1>Example Domain</h1>\n    <p>This domain is for use in illustrative examples in documents. You may use this\n    domain in literature without prior coordination or asking for permission.</p>\n    <p><a href="https://www.iana.org/domains/example">More information...</a></p>\n</div>\n</body>\n</html>\n'



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/woncoh1/aiocapsule",
    "name": "aiocapsule",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "nbdev jupyter notebook python",
    "author": "woncoh1",
    "author_email": "woncoh1@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6b/95/6fa2b424bed48b77c9af7802f6bdc69527942c2d6d031fa72ac09da987e1/aiocapsule-0.0.2.tar.gz",
    "platform": null,
    "description": "# aiocapsule\n\n<!-- WARNING: THIS FILE WAS AUTOGENERATED! DO NOT EDIT! -->\n\n- A minimal package containing an AIOHTTP wrapper function\n- Designed for asynchronous HTTP requests to *a large, unknown number of\n  different servers*\n- Support for HTTP proxy and basic authentication\n\n## Install\n\n``` sh\npip install aiocapsule\n```\n\n## How to use\n\n``` python\nfrom aiocapsule.core import request\n```\n\nA simple call returning JSON as a dict:\n\n``` python\nawait request('GET', 'https://api.coingecko.com/api/v3/ping')\n```\n\n    {'gecko_says': '(V3) To the Moon!'}\n\nOr a string of HTML:\n\n``` python\nawait request('GET', 'https://example.com/', text=True)\n```\n\n    '<!doctype html>\\n<html>\\n<head>\\n    <title>Example Domain</title>\\n\\n    <meta charset=\"utf-8\" />\\n    <meta http-equiv=\"Content-type\" content=\"text/html; charset=utf-8\" />\\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1\" />\\n    <style type=\"text/css\">\\n    body {\\n        background-color: #f0f0f2;\\n        margin: 0;\\n        padding: 0;\\n        font-family: -apple-system, system-ui, BlinkMacSystemFont, \"Segoe UI\", \"Open Sans\", \"Helvetica Neue\", Helvetica, Arial, sans-serif;\\n        \\n    }\\n    div {\\n        width: 600px;\\n        margin: 5em auto;\\n        padding: 2em;\\n        background-color: #fdfdff;\\n        border-radius: 0.5em;\\n        box-shadow: 2px 3px 7px 2px rgba(0,0,0,0.02);\\n    }\\n    a:link, a:visited {\\n        color: #38488f;\\n        text-decoration: none;\\n    }\\n    @media (max-width: 700px) {\\n        div {\\n            margin: 0 auto;\\n            width: auto;\\n        }\\n    }\\n    </style>    \\n</head>\\n\\n<body>\\n<div>\\n    <h1>Example Domain</h1>\\n    <p>This domain is for use in illustrative examples in documents. You may use this\\n    domain in literature without prior coordination or asking for permission.</p>\\n    <p><a href=\"https://www.iana.org/domains/example\">More information...</a></p>\\n</div>\\n</body>\\n</html>\\n'\n\n\n",
    "bugtrack_url": null,
    "license": "Apache Software License 2.0",
    "summary": "Simple wrapper for AIOHTTP client session, request and response",
    "version": "0.0.2",
    "project_urls": {
        "Homepage": "https://github.com/woncoh1/aiocapsule"
    },
    "split_keywords": [
        "nbdev",
        "jupyter",
        "notebook",
        "python"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a99ed2e18d06968db16a954753a9489a85ecbcc1e1d84edd68938f8409cf26d9",
                "md5": "51eae6a58993a4d2fff4feabebb39a67",
                "sha256": "8e1e297be45fd62b769499678f224ec916d787bcee21705b67e722c7a984fab3"
            },
            "downloads": -1,
            "filename": "aiocapsule-0.0.2-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "51eae6a58993a4d2fff4feabebb39a67",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 7961,
            "upload_time": "2023-07-21T00:25:23",
            "upload_time_iso_8601": "2023-07-21T00:25:23.956001Z",
            "url": "https://files.pythonhosted.org/packages/a9/9e/d2e18d06968db16a954753a9489a85ecbcc1e1d84edd68938f8409cf26d9/aiocapsule-0.0.2-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6b956fa2b424bed48b77c9af7802f6bdc69527942c2d6d031fa72ac09da987e1",
                "md5": "fa76ec034727d44100a443a56b4ca4b5",
                "sha256": "2aa6bfc3025efa397241594711bf3e917476e67d86249b1e7562f1544c0a0f99"
            },
            "downloads": -1,
            "filename": "aiocapsule-0.0.2.tar.gz",
            "has_sig": false,
            "md5_digest": "fa76ec034727d44100a443a56b4ca4b5",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 8575,
            "upload_time": "2023-07-21T00:25:25",
            "upload_time_iso_8601": "2023-07-21T00:25:25.467812Z",
            "url": "https://files.pythonhosted.org/packages/6b/95/6fa2b424bed48b77c9af7802f6bdc69527942c2d6d031fa72ac09da987e1/aiocapsule-0.0.2.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-07-21 00:25:25",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "woncoh1",
    "github_project": "aiocapsule",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "aiocapsule"
}
        
Elapsed time: 0.10104s