Skip to content
frankie567Public

About

WebSocket support for HTTPX

Topics

Resources

Stars

151 stars

Watchers

4 watching

Forks

Repository files navigation

HTTPX WS

WebSockets support for HTTPX

build codecov All Contributors PyPI version Downloads


Documentation: https://frankie567.github.io/httpx-ws/

Source Code: https://github.com/frankie567/httpx-ws


Installation

pip install httpx-ws

Features

  • Sync and async client
  • Helper methods to send text, binary and JSON data
  • Helper methods to receive text, binary and JSON data
  • Automatic ping/pong answers
  • HTTPX transport to test WebSockets defined in ASGI apps
  • Automatic keepalive ping
  • asyncio and Trio support through AnyIO

Contributors ✨

Thanks goes to these wonderful people (emoji key):

François Voron
François Voron

🚧 💻
Kousik Mitra
Kousik Mitra

💻
David Brochart
David Brochart

📦 💻
ysmu
ysmu

🐛
Sam Foreman
Sam Foreman

🐛
Marc-Antoine Parent
Marc-Antoine Parent

🐛 💻
Marcelo Trylesinski
Marcelo Trylesinski

🐛 🔬
MtkN1
MtkN1

🐛 🔬 💻
Tom Christie
Tom Christie

🐛 🔬
David Montague
David Montague

🐛
Sean Wang
Sean Wang

💻
Alex Grönholm
Alex Grönholm

🐛 💻
Rodrigo de Oliveira Neto
Rodrigo de Oliveira Neto

🐛 💻
Elaina
Elaina

💻
runsisi
runsisi

🐛 🔬
Luis Linares
Luis Linares

🐛
Graeme Holliday
Graeme Holliday

🐛 💻
Ilia Ablamonov
Ilia Ablamonov

🐛

This project follows the all-contributors specification. Contributions of any kind welcome!

Development

Setup environment

We use uv to manage the development environment and production build, and just to manage command shortcuts. Ensure they are installed on your system.

Run just install to install the development dependencies and pre-commit hooks.

Run unit tests

You can run all the tests with:

just test

Format the code

Execute the following command to apply linting and check typing:

just lint

Documentation

Use just docs-serve to preview the Zensical site and just docs-build to build it into site/.

Publishing a release

  1. Commit the release entries under Unreleased in CHANGELOG.md. From a clean release branch with Git signing configured, run just version patch, just version minor, or just version major. The recipe updates the version, changelog, and lockfile and creates a signed commit.
  2. Preview the release body with just release-notes <version>, then push the branch and merge the release PR into main.
  3. With the GitHub CLI authenticated, run just release <PR number>. This signs and pushes a tag for the exact commit that landed, even if main has advanced. After the checks pass, CI publishes to PyPI and then publishes the GitHub release.

The PyPI Trusted Publisher must match build.yml and the GitHub release environment.

License

This project is licensed under the terms of the MIT license.

About

WebSocket support for HTTPX

Topics

Resources

Stars

151 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages