rsocket / rsocket-py

RSocket implementation in Python
MIT License
76 stars 23 forks source link

RSocket-py

Python implementation of RSocket

Installation

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 setup.py bdist_wheel

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

python3 setup.py install

Documentation

Documentation is available on the official rsocket.io site.

Examples

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/test_examples.py can be used to execute the relevant example server/client pairs.

client_springboot.py is set up to work against the Spring RSocket demo.

server (python) server (java) client (python) client(java)
server.py client.py
server_quic.py client_quic.py
server_with_lease.py ClientWithLease
server_with_routing.py client_with_routing.py Client
server_with_routing.py client_rx.py
server_with_routing.py client_reconnect.py
Server run_against_example_java_server.py
ServerWithFragmentation client_with_routing.py
server_quart_websocket.py client_websocket.py
server_aiohttp_websocket.py client_websocket.py
server_graphql.py ServerWithGraphQL client_graphql.py

Build Status

build master Coverage Status CodeQL

Progress