Skip to main content

WebSocket-RS 🚀

High-performance WebSocket client implementation in Rust with Python bindings. Provides both sync and async APIs with significant performance improvements over pure Python implementations.

🎯 Performance Highlights

  • Sync Client: 1.85x faster than websocket-client, 6.2x faster than websockets
  • Async Client (Pipelined): 12x faster than picows, 21x faster than websockets
  • Pure Rust implementation with zero-copy optimizations
  • Thread-safe with concurrent operations support

📦 Installation

pip install websocket-rs

🚀 Quick Start

Synchronous Client

from websocket_rs.sync.client import connect

# Simple usage
with connect("ws://localhost:8765") as ws:
    ws.send("Hello, WebSocket!")
    response = ws.recv()
    print(response)

Asynchronous Client

import asyncio
from websocket_rs.async_client import connect

async def main():
    async with connect("ws://localhost:8765") as ws:
        await ws.send("Hello, Async!")
        response = await ws.recv()
        print(response)

asyncio.run(main())

📚 Full Documentation

Visit our GitHub repository for comprehensive documentation:

🌟 Key Features

  • 🚄 High Performance: Rust-powered implementation
  • 🔄 Dual APIs: Both sync and async support
  • ✅ Drop-in Replacement: Compatible with Python websockets library
  • 🔒 Thread-Safe: Safe concurrent operations
  • ⚡ Zero-Copy: Optimized memory usage
  • 🐍 Python 3.12+: Modern Python support

📝 Requirements

  • Python 3.12 or higher
  • Supported platforms: Linux, Windows, macOS (x86_64, ARM64)

📄 License

MIT License - see LICENSE for details.


Made with ❤️ using Rust and PyO3

Metadata

Release files for websocket-rs 0.7.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for websocket-rs 0.7.9
File Size Uploaded
websocket_rs-0.7.9.tar.gz 208.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for websocket-rs 0.7.9
File
websocket_rs-0.7.9-cp312-abi3-win_amd64.whl CPython 3.12 abi3 Windows x86-64 Details
websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_x86_64.whl CPython 3.12 abi3 Linux glibc 2.34+ x86-64 Details
websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_aarch64.whl CPython 3.12 abi3 Linux glibc 2.34+ ARM64 Details
websocket_rs-0.7.9-cp312-abi3-macosx_11_0_arm64.whl CPython 3.12 abi3 macOS 11.0+ ARM64 Details

Total release size: 5.3 MB

Release files / websocket_rs-0.7.9.tar.gz

Download URL websocket_rs-0.7.9.tar.gz
Size 208.9 kB
Tags Source
SHA-256 checksum
How to use checksums
17297553a54759585f8f163651aedd28fcc1e7d26995b932cf56bc821df3e22e
BLAKE2b-256 checksum
How to use checksums
a289d15560d143d6d3348a4dd47483f90468318f2e41373d32e60b3b37f6447d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / websocket_rs-0.7.9-cp312-abi3-win_amd64.whl

Download URL websocket_rs-0.7.9-cp312-abi3-win_amd64.whl
Size 1.2 MB
Tags CPython 3.12 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
8a51ac40b49ff239b662dbb38e1eb1ccc8ec6c3a92dbb362ddb383162f78221b
BLAKE2b-256 checksum
How to use checksums
d1942d5af89b4583d23b5977c7c037c78649f30a06b56d605d6bf3deb6a9df72
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_x86_64.whl

Download URL websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_x86_64.whl
Size 1.4 MB
Tags CPython 3.12 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
b5498cf4c8933f24b0592a63faf4118a53c97f073e26b2e5e093b9297b5c1b59
BLAKE2b-256 checksum
How to use checksums
143d88bac36c9c8d0be0533f8400bcc8724cece12a67103312364145486dce17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_aarch64.whl

Download URL websocket_rs-0.7.9-cp312-abi3-manylinux_2_34_aarch64.whl
Size 1.3 MB
Tags CPython 3.12 Linux glibc 2.34+ ARM64 abi3
SHA-256 checksum
How to use checksums
876df56ce26531d48751c15dcd635513548cd9ff01a0b7290de4bceefcf35f37
BLAKE2b-256 checksum
How to use checksums
d67f90006124160a053cf6950145216d12ef2f909f8d83a2bc6f9ca31b4aa8d9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release files / websocket_rs-0.7.9-cp312-abi3-macosx_11_0_arm64.whl

Download URL websocket_rs-0.7.9-cp312-abi3-macosx_11_0_arm64.whl
Size 1.2 MB
Tags CPython 3.12 abi3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
1b68b8b026d8dae53c9ef08faa2bd104b103846058674a80b1f4301f31a71445
BLAKE2b-256 checksum
How to use checksums
479df7e1b9cd3383eccfd32cb010ccb6f55ada199b6a766a6a58e72eb90c5b9f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.14

Release history Release notifications | RSS feed

This release

0.7.9 This release

5 release files

0.7.8

5 release files

0.7.7

5 release files

0.7.6

5 release files

0.7.5

5 release files

0.7.4

5 release files

0.7.3

5 release files

0.7.2

5 release files

0.7.1

5 release files

0.7.0

5 release files

0.6.0

5 release files

0.5.0

5 release files

0.4.1

4 release files

0.4.0

4 release files

0.3.1

4 release files

0.3.0

4 release files

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page