https://github.com/frankie567/httpx-ws
WebSocket support for HTTPX
https://github.com/frankie567/httpx-ws
httpx websockets
Last synced: 5 months ago
JSON representation
WebSocket support for HTTPX
- Host: GitHub
- URL: https://github.com/frankie567/httpx-ws
- Owner: frankie567
- License: mit
- Created: 2022-11-22T08:06:40.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2025-03-28T13:11:32.000Z (7 months ago)
- Last Synced: 2025-05-11T20:46:49.979Z (5 months ago)
- Topics: httpx, websockets
- Language: Python
- Homepage: https://frankie567.github.io/httpx-ws/
- Size: 220 KB
- Stars: 127
- Watchers: 4
- Forks: 23
- Open Issues: 9
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
- best-of-web-python - GitHub - 16% open · ⏱️ 20.09.2025): (Websocket Utilities)
README
# HTTPX WS
WebSockets support for HTTPX[](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)---
**Documentation**: https://frankie567.github.io/httpx-ws/
**Source Code**: https://github.com/frankie567/httpx-ws
---
## 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)):
François Voron
🚧 💻
Kousik Mitra
💻
David Brochart
📦 💻
ysmu
🐛
Sam Foreman
🐛
Marc-Antoine Parent
🐛 💻
Marcelo Trylesinski
🐛 🔬
MtkN1
🐛 🔬
Tom Christie
🐛 🔬
David Montague
🐛
Sean Wang
💻
Alex Grönholm
🐛 💻
Rodrigo de Oliveira Neto
🐛 💻
Elaina
💻
runsisi
🐛 🔬
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.