Skip to content

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.