Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions python-client/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.venv/
__pycache__/
*.pyc
*.egg-info/
.pytest_cache/
dist/
build/
# esbuild build artifact (built from test_server.ts at test time)
tests/test_server.mjs
28 changes: 28 additions & 0 deletions python-client/pyproject.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
[build-system]
requires = ["setuptools>=68.0", "wheel"]
build-backend = "setuptools.build_meta"

[project]
name = "river-client"
version = "0.1.0"
description = "Python client for River protocol v2.0"
readme = "README.md"
requires-python = ">=3.10"
license = {text = "MIT"}
dependencies = [
"websockets>=12.0",
"msgpack>=1.0",
]

[project.optional-dependencies]
dev = [
"pytest>=8.0",
"pytest-asyncio>=0.23",
]

[tool.pytest.ini_options]
asyncio_mode = "auto"
testpaths = ["tests"]

[tool.setuptools.packages.find]
include = ["river*"]
19 changes: 19 additions & 0 deletions python-client/river/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""River protocol v2.0 Python client implementation."""

from river.types import TransportMessage, Ok, Err
from river.codec import NaiveJsonCodec, BinaryCodec
from river.transport import WebSocketClientTransport
from river.client import RiverClient
from river.streams import Readable, Writable

__all__ = [
"RiverClient",
"WebSocketClientTransport",
"NaiveJsonCodec",
"BinaryCodec",
"TransportMessage",
"Ok",
"Err",
"Readable",
"Writable",
]
Loading
Loading