Name | httpx-ws JSON |
Version |
0.7.1
JSON |
| download |
home_page | None |
Summary | WebSockets support for HTTPX |
upload_time | 2025-01-04 13:32:58 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# HTTPX WS
<p align="center">
<em>WebSockets support for HTTPX</em>
</p>
[](https://github.com/frankie567/httpx-ws/actions)
[](https://codecov.io/gh/frankie567/httpx-ws)
[](#contributors-)
[](https://badge.fury.io/py/httpx-ws)
[](https://pepy.tech/project/httpx-ws)
<p align="center">
<a href="https://polar.sh/frankie567">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://polar.sh/embed/subscribe.svg?org=frankie567&darkmode=1">
<img alt="Subscribe" src="https://polar.sh/embed/subscribe.svg?org=frankie567">
</picture>
</a>
</p>
---
**Documentation**: <a href="https://frankie567.github.io/httpx-ws/" target="_blank">https://frankie567.github.io/httpx-ws/</a>
**Source Code**: <a href="https://github.com/frankie567/httpx-ws" target="_blank">https://github.com/frankie567/httpx-ws</a>
---
## Installation
```bash
pip install httpx-ws
```
## Features
* [X] Sync and async client
* [X] Helper methods to send text, binary and JSON data
* [X] Helper methods to receive text, binary and JSON data
* [X] Automatic ping/pong answers
* [X] HTTPX transport to test WebSockets defined in ASGI apps
* [X] Automatic keepalive ping
* [X] `asyncio` and [Trio](https://trio.readthedocs.io/) support through [AnyIO](https://anyio.readthedocs.io/)
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tbody>
<tr>
<td align="center" valign="top" width="14.28%"><a href="http://francoisvoron.com"><img src="https://avatars.githubusercontent.com/u/1144727?v=4?s=100" width="100px;" alt="François Voron"/><br /><sub><b>François Voron</b></sub></a><br /><a href="#maintenance-frankie567" title="Maintenance">🚧</a> <a href="https://github.com/frankie567/httpx-ws/commits?author=frankie567" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://kousikmitra.github.io"><img src="https://avatars.githubusercontent.com/u/15109533?v=4?s=100" width="100px;" alt="Kousik Mitra"/><br /><sub><b>Kousik Mitra</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/commits?author=kousikmitra" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/davidbrochart"><img src="https://avatars.githubusercontent.com/u/4711805?v=4?s=100" width="100px;" alt="David Brochart"/><br /><sub><b>David Brochart</b></sub></a><br /><a href="#platform-davidbrochart" title="Packaging/porting to new platform">📦</a> <a href="https://github.com/frankie567/httpx-ws/commits?author=davidbrochart" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ysmu"><img src="https://avatars.githubusercontent.com/u/17018576?v=4?s=100" width="100px;" alt="ysmu"/><br /><sub><b>ysmu</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Aysmu" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://samforeman.me"><img src="https://avatars.githubusercontent.com/u/5234251?v=4?s=100" width="100px;" alt="Sam Foreman"/><br /><sub><b>Sam Foreman</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Asaforem2" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://maparent.ca/"><img src="https://avatars.githubusercontent.com/u/202691?v=4?s=100" width="100px;" alt="Marc-Antoine Parent"/><br /><sub><b>Marc-Antoine Parent</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Amaparent" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/httpx-ws/commits?author=maparent" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://www.fastapiexpert.com/"><img src="https://avatars.githubusercontent.com/u/7353520?v=4?s=100" width="100px;" alt="Marcelo Trylesinski"/><br /><sub><b>Marcelo Trylesinski</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3AKludex" title="Bug reports">🐛</a> <a href="#research-Kludex" title="Research">🔬</a></td>
</tr>
<tr>
<td align="center" valign="top" width="14.28%"><a href="https://lit.link/MtkN1"><img src="https://avatars.githubusercontent.com/u/51289448?v=4?s=100" width="100px;" alt="MtkN1"/><br /><sub><b>MtkN1</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3AMtkN1" title="Bug reports">🐛</a> <a href="#research-MtkN1" title="Research">🔬</a></td>
<td align="center" valign="top" width="14.28%"><a href="http://www.tomchristie.com/"><img src="https://avatars.githubusercontent.com/u/647359?v=4?s=100" width="100px;" alt="Tom Christie"/><br /><sub><b>Tom Christie</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Atomchristie" title="Bug reports">🐛</a> <a href="#research-tomchristie" title="Research">🔬</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/dmontagu"><img src="https://avatars.githubusercontent.com/u/35119617?v=4?s=100" width="100px;" alt="David Montague"/><br /><sub><b>David Montague</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Admontagu" title="Bug reports">🐛</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/WSH032"><img src="https://avatars.githubusercontent.com/u/126865849?v=4?s=100" width="100px;" alt="Sean Wang"/><br /><sub><b>Sean Wang</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/commits?author=WSH032" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/agronholm"><img src="https://avatars.githubusercontent.com/u/130003?v=4?s=100" width="100px;" alt="Alex Grönholm"/><br /><sub><b>Alex Grönholm</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Aagronholm" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/httpx-ws/commits?author=agronholm" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://github.com/ro-oliveira95"><img src="https://avatars.githubusercontent.com/u/27009864?v=4?s=100" width="100px;" alt="Rodrigo de Oliveira Neto"/><br /><sub><b>Rodrigo de Oliveira Neto</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/issues?q=author%3Aro-oliveira95" title="Bug reports">🐛</a> <a href="https://github.com/frankie567/httpx-ws/commits?author=ro-oliveira95" title="Code">💻</a></td>
<td align="center" valign="top" width="14.28%"><a href="https://tinymind.me/GreyElaina"><img src="https://avatars.githubusercontent.com/u/31543961?v=4?s=100" width="100px;" alt="Elaina"/><br /><sub><b>Elaina</b></sub></a><br /><a href="https://github.com/frankie567/httpx-ws/commits?author=GreyElaina" title="Code">💻</a></td>
</tr>
</tbody>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!
## Development
### Setup environment
We use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.
### Run unit tests
You can run all the tests with:
```bash
hatch run test
```
### Format the code
Execute the following command to apply linting and check typing:
```bash
hatch run lint
```
## License
This project is licensed under the terms of the MIT license.
Raw data
{
"_id": null,
"home_page": null,
"name": "httpx-ws",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Fran\u00e7ois Voron <fvoron@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/a2/bc/ec7e7ac18dc6303187c7999c4b224bd3214745cd757b85ca14c8523c2a7f/httpx_ws-0.7.1.tar.gz",
"platform": null,
"description": "# HTTPX WS\n\n<p align=\"center\">\n <em>WebSockets support for HTTPX</em>\n</p>\n\n[](https://github.com/frankie567/httpx-ws/actions)\n[](https://codecov.io/gh/frankie567/httpx-ws)\n[](#contributors-)\n[](https://badge.fury.io/py/httpx-ws)\n[](https://pepy.tech/project/httpx-ws)\n\n<p align=\"center\">\n<a href=\"https://polar.sh/frankie567\">\n<picture>\n <source media=\"(prefers-color-scheme: dark)\" srcset=\"https://polar.sh/embed/subscribe.svg?org=frankie567&darkmode=1\">\n <img alt=\"Subscribe\" src=\"https://polar.sh/embed/subscribe.svg?org=frankie567\">\n</picture>\n</a>\n</p>\n\n---\n\n**Documentation**: <a href=\"https://frankie567.github.io/httpx-ws/\" target=\"_blank\">https://frankie567.github.io/httpx-ws/</a>\n\n**Source Code**: <a href=\"https://github.com/frankie567/httpx-ws\" target=\"_blank\">https://github.com/frankie567/httpx-ws</a>\n\n---\n\n## Installation\n\n```bash\npip install httpx-ws\n```\n\n## Features\n\n* [X] Sync and async client\n* [X] Helper methods to send text, binary and JSON data\n* [X] Helper methods to receive text, binary and JSON data\n* [X] Automatic ping/pong answers\n* [X] HTTPX transport to test WebSockets defined in ASGI apps\n* [X] Automatic keepalive ping\n* [X] `asyncio` and [Trio](https://trio.readthedocs.io/) support through [AnyIO](https://anyio.readthedocs.io/)\n\n## Contributors \u2728\n\nThanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):\n\n<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->\n<!-- prettier-ignore-start -->\n<!-- markdownlint-disable -->\n<table>\n <tbody>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://francoisvoron.com\"><img src=\"https://avatars.githubusercontent.com/u/1144727?v=4?s=100\" width=\"100px;\" alt=\"Fran\u00e7ois Voron\"/><br /><sub><b>Fran\u00e7ois Voron</b></sub></a><br /><a href=\"#maintenance-frankie567\" title=\"Maintenance\">\ud83d\udea7</a> <a href=\"https://github.com/frankie567/httpx-ws/commits?author=frankie567\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://kousikmitra.github.io\"><img src=\"https://avatars.githubusercontent.com/u/15109533?v=4?s=100\" width=\"100px;\" alt=\"Kousik Mitra\"/><br /><sub><b>Kousik Mitra</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/commits?author=kousikmitra\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/davidbrochart\"><img src=\"https://avatars.githubusercontent.com/u/4711805?v=4?s=100\" width=\"100px;\" alt=\"David Brochart\"/><br /><sub><b>David Brochart</b></sub></a><br /><a href=\"#platform-davidbrochart\" title=\"Packaging/porting to new platform\">\ud83d\udce6</a> <a href=\"https://github.com/frankie567/httpx-ws/commits?author=davidbrochart\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/ysmu\"><img src=\"https://avatars.githubusercontent.com/u/17018576?v=4?s=100\" width=\"100px;\" alt=\"ysmu\"/><br /><sub><b>ysmu</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Aysmu\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://samforeman.me\"><img src=\"https://avatars.githubusercontent.com/u/5234251?v=4?s=100\" width=\"100px;\" alt=\"Sam Foreman\"/><br /><sub><b>Sam Foreman</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Asaforem2\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://maparent.ca/\"><img src=\"https://avatars.githubusercontent.com/u/202691?v=4?s=100\" width=\"100px;\" alt=\"Marc-Antoine Parent\"/><br /><sub><b>Marc-Antoine Parent</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Amaparent\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/frankie567/httpx-ws/commits?author=maparent\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://www.fastapiexpert.com/\"><img src=\"https://avatars.githubusercontent.com/u/7353520?v=4?s=100\" width=\"100px;\" alt=\"Marcelo Trylesinski\"/><br /><sub><b>Marcelo Trylesinski</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3AKludex\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"#research-Kludex\" title=\"Research\">\ud83d\udd2c</a></td>\n </tr>\n <tr>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://lit.link/MtkN1\"><img src=\"https://avatars.githubusercontent.com/u/51289448?v=4?s=100\" width=\"100px;\" alt=\"MtkN1\"/><br /><sub><b>MtkN1</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3AMtkN1\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"#research-MtkN1\" title=\"Research\">\ud83d\udd2c</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"http://www.tomchristie.com/\"><img src=\"https://avatars.githubusercontent.com/u/647359?v=4?s=100\" width=\"100px;\" alt=\"Tom Christie\"/><br /><sub><b>Tom Christie</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Atomchristie\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"#research-tomchristie\" title=\"Research\">\ud83d\udd2c</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/dmontagu\"><img src=\"https://avatars.githubusercontent.com/u/35119617?v=4?s=100\" width=\"100px;\" alt=\"David Montague\"/><br /><sub><b>David Montague</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Admontagu\" title=\"Bug reports\">\ud83d\udc1b</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/WSH032\"><img src=\"https://avatars.githubusercontent.com/u/126865849?v=4?s=100\" width=\"100px;\" alt=\"Sean Wang\"/><br /><sub><b>Sean Wang</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/commits?author=WSH032\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/agronholm\"><img src=\"https://avatars.githubusercontent.com/u/130003?v=4?s=100\" width=\"100px;\" alt=\"Alex Gr\u00f6nholm\"/><br /><sub><b>Alex Gr\u00f6nholm</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Aagronholm\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/frankie567/httpx-ws/commits?author=agronholm\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://github.com/ro-oliveira95\"><img src=\"https://avatars.githubusercontent.com/u/27009864?v=4?s=100\" width=\"100px;\" alt=\"Rodrigo de Oliveira Neto\"/><br /><sub><b>Rodrigo de Oliveira Neto</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/issues?q=author%3Aro-oliveira95\" title=\"Bug reports\">\ud83d\udc1b</a> <a href=\"https://github.com/frankie567/httpx-ws/commits?author=ro-oliveira95\" title=\"Code\">\ud83d\udcbb</a></td>\n <td align=\"center\" valign=\"top\" width=\"14.28%\"><a href=\"https://tinymind.me/GreyElaina\"><img src=\"https://avatars.githubusercontent.com/u/31543961?v=4?s=100\" width=\"100px;\" alt=\"Elaina\"/><br /><sub><b>Elaina</b></sub></a><br /><a href=\"https://github.com/frankie567/httpx-ws/commits?author=GreyElaina\" title=\"Code\">\ud83d\udcbb</a></td>\n </tr>\n </tbody>\n</table>\n\n<!-- markdownlint-restore -->\n<!-- prettier-ignore-end -->\n\n<!-- ALL-CONTRIBUTORS-LIST:END -->\n\nThis project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!\n\n## Development\n\n### Setup environment\n\nWe use [Hatch](https://hatch.pypa.io/latest/install/) to manage the development environment and production build. Ensure it's installed on your system.\n\n### Run unit tests\n\nYou can run all the tests with:\n\n```bash\nhatch run test\n```\n\n### Format the code\n\nExecute the following command to apply linting and check typing:\n\n```bash\nhatch run lint\n```\n\n## License\n\nThis project is licensed under the terms of the MIT license.\n",
"bugtrack_url": null,
"license": null,
"summary": "WebSockets support for HTTPX",
"version": "0.7.1",
"project_urls": {
"Documentation": "https://frankie567.github.io/httpx-ws/",
"Source": "https://github.com/frankie567/httpx-ws"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "005ba27d1c8eda1fdce8c0668a3ea7e09bcc43986f5b306703c46b0f42d2165f",
"md5": "71b31f566afe71dfaf3eb90fc5ff153a",
"sha256": "7970e470840d8e6c17bd45ed4e7af06f9144a4a9decab2ff226f3ff9accb65b4"
},
"downloads": -1,
"filename": "httpx_ws-0.7.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "71b31f566afe71dfaf3eb90fc5ff153a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14438,
"upload_time": "2025-01-04T13:33:00",
"upload_time_iso_8601": "2025-01-04T13:33:00.893447Z",
"url": "https://files.pythonhosted.org/packages/00/5b/a27d1c8eda1fdce8c0668a3ea7e09bcc43986f5b306703c46b0f42d2165f/httpx_ws-0.7.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "a2bcec7e7ac18dc6303187c7999c4b224bd3214745cd757b85ca14c8523c2a7f",
"md5": "d0013ce21289168cace1e490b2791098",
"sha256": "72f355d4b9b16d8fa59e5e68efdfcb1f3c7dca944901b373791245c8f67f9f95"
},
"downloads": -1,
"filename": "httpx_ws-0.7.1.tar.gz",
"has_sig": false,
"md5_digest": "d0013ce21289168cace1e490b2791098",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 24114,
"upload_time": "2025-01-04T13:32:58",
"upload_time_iso_8601": "2025-01-04T13:32:58.853635Z",
"url": "https://files.pythonhosted.org/packages/a2/bc/ec7e7ac18dc6303187c7999c4b224bd3214745cd757b85ca14c8523c2a7f/httpx_ws-0.7.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-04 13:32:58",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "frankie567",
"github_project": "httpx-ws",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "httpx-ws"
}