{"id":21875,"library":"replit-river","title":"Replit River","description":"Replit River is a Python toolkit for building reliable, bidirectional communication channels (RPC, streaming, etc.) between services, primarily used in the Replit environment. Current version 0.17.19 requires Python 3.12+ and is under active development with frequent releases.","status":"active","version":"0.17.19","language":"python","source_language":"en","source_url":"https://github.com/replit/river","tags":["rpc","streaming","replit","async","websocket"],"install":[{"cmd":"pip install replit-river","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"HTTP transport for river","package":"aiohttp","optional":false},{"reason":"Fast JSON serialization","package":"orjson","optional":false}],"imports":[{"note":"Package name is replit_river, not river","wrong":"from river.client import RiverClient","symbol":"RiverClient","correct":"from replit_river.client import RiverClient"},{"note":"RiverServer is not in __init__; must import from server submodule","wrong":"from replit_river import RiverServer","symbol":"RiverServer","correct":"from replit_river.server import RiverServer"}],"quickstart":{"code":"import asyncio\nfrom replit_river.client import RiverClient\n\nasync def main():\n    client = RiverClient(url='https://your-service.com', transport='ws')\n    # Example: call a remote method\n    result = await client.call('greet', {'name': 'World'})\n    print(result)\n\nasyncio.run(main())","lang":"python","description":"Minimal client example: create RiverClient with WebSocket transport, call a remote procedure."},"warnings":[{"fix":"Upgrade Python to 3.12 or higher.","message":"Python 3.12 minimum: river requires Python >=3.12 (as of 0.17.x). Install may fail on older versions.","severity":"breaking","affected_versions":"0.17.0+"},{"fix":"Use `from replit_river.client import RiverClient` and `from replit_river.server import RiverServer`.","message":"RiverClient and RiverServer are not top-level exports: importing from `replit_river` directly does not expose them. Must import from the respective submodules.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `transport='ws'` instead of `scheme='ws'`.","message":"Transport parameter change: in early 0.16.x versions, the transport was specified via `scheme` argument. As of 0.17.x, it's `transport` with values 'ws' or 'http'.","severity":"breaking","affected_versions":"0.17.0+"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Run `pip install replit-river` and use `import replit_river` (with underscore).","cause":"Package not installed or misspelled (e.g., 'replit-river' vs 'replit_river').","error":"ModuleNotFoundError: No module named 'replit_river'"},{"fix":"Use `from replit_river.client import RiverClient`.","cause":"RiverClient is not exported from top-level package; must import from submodule.","error":"ImportError: cannot import name 'RiverClient' from 'replit_river'"},{"fix":"Replace `scheme='ws'` with `transport='ws'`.","cause":"API changed: `scheme` renamed to `transport` in version 0.17.0.","error":"TypeError: __init__() got an unexpected keyword argument 'scheme'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}