Skip to content


Repository files navigation


Python implementation of RSocket


The latest version from pypi can be installed using:

pip install rsocket

You may also install using some extras:

Extra Functionality Documentation
rx ReactiveX (v3) integration Tutorial
reactivex ReactiveX (v4) integration Tutorial
aiohttp aiohttp Websocket transport (server/client) Tutorial
quart Quart Websocket transport (server only)
quic QUIC transport
websockets Websockets transport (server only)
asyncwebsockets Websockets transport (client only)
cli Command line Tutorial
optimized Frame parse/serialize optimizations
cloudevents CloudEvents integration
graphql GraphQL integration Tutorial

For example:

pip install rsocket[reactivex]

Alternatively, download the source code, build a package:

python3 bdist_wheel

Use the resulting package from the ./dist folder, or install locally:

python3 install


Documentation is available on the official site.


Examples can be found in the /examples folder. It contains various server and client usages. The following is a table denoting which client example is constructed to be run against which server example. Some examples are in java to show compatibility with a different implementation. To run the java examples first build using mvn package.

The examples/ can be used to execute the relevant example server/client pairs. is set up to work against the Spring RSocket demo.

server (python) server (java) client (python) client(java) ClientWithLease Client
ServerWithFragmentation ServerWithGraphQL

Build Status

build master Coverage Status CodeQL


  • Requests
    • Fire and forget
    • Response
    • Stream
    • Channel
    • Metadata push
  • Features
    • Keepalive / Max server life
    • Lease
    • Resume
    • Fragmentation
  • Extensions
    • Composite metadata
    • Per Stream Mimetype
    • Routing
    • Authentication
  • Transports
    • TCP
    • Websocket (WS, WSS) - Quart and aiohttp integration
    • QUIC
    • HTTP/3
    • HTTP/2
    • Aeron
  • RxPy Integration
    • Stream Response
    • Channel Response
    • Channel Requester stream
    • Response
  • Other
    • Reconnect
    • Load balancing
    • Server routing definition helper (Flask like syntax)
    • Reactivex integration (v3, v4) server/client side
    • Command line interface