{"repo":"permitio/fastapi_websocket_rpc","free":true,"listed":false,"github":"https://github.com/permitio/fastapi_websocket_rpc","clone":"git clone https://github.com/permitio/fastapi_websocket_rpc.git","description":"⚡ FASTAPI Websocket RPC- A fast and durable bidirectional JSON RPC channel over Websockets.","language":"Python","stars":267,"topics":["rpc","websockets","asyncio","python","fastapi","realtime-messaging","fastapi-websocket-rpc"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"⚡ FASTAPI Websocket RPC RPC over Websockets made easy, robust, and production ready A fast and durable bidirectional JSON RPC channel over Websockets. The easiest way to create a live async channel between two nodes via Python (or other clients). - Both server and clients can easily expose Python methods that can be called by the other side. Method return values are sent back as RPC responses, which the other side can wait on. - Remote methods are easily called via the wrapper - Connections are kept alive with a configurable retry mechanism (using Tenacity) - As seen at PyCon IL 2021 and EuroPython 2021 Supports and tested on Python = 3.9 Installation 🛠️ RPC call example: Say the server exposes an \"add\" method, e.g. : Calling it is as easy as calling the method under the client's \"other\" property: getting the response with the return value. Usage example: Server: Client See the examples and tests folders for more server and client examples Server calling client example: - Clients can call - which is a shortcut for - Servers also get the channel object and can call remote methods via - See the bidirectional call example for calling client from server and server events (e.g. ). What can I do with this? Websockets are ideal to create bi-directional realtime connections over the web. - Push updates - Remote control mechanism - Pub / Sub (see fastapi websocket pubsub) - Trigger events (see \"tests/trigger flow test.py\") - Node negotiations (see \"tests/advanced rpc test.py :: test ","default_branch":null,"files":null,"tree":[],"storefront":"/r/permitio","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/permitio/fastapi_websocket_rpc/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}