diff --git a/README.md b/README.md index e1b74865..42b93573 100644 --- a/README.md +++ b/README.md @@ -10,17 +10,19 @@ and [UDSinks](https://numaproj.github.io/numaflow/sinks/user-defined-sinks/) in from pynumaflow.function import Messages, Message, Datum, UserDefinedFunctionServicer -def map_handler(key: str, datum: Datum) -> Messages: +def function_handler(key: str, datum: Datum) -> Messages: + """ + Simple UDF that relays an incoming message. + """ val = datum.value _ = datum.event_time _ = datum.watermark - messages = Messages() - messages.append(Message.to_vtx(key, val)) + messages = Messages(Message(key=key, value=val)) return messages if __name__ == "__main__": - grpc_server = UserDefinedFunctionServicer(map_handler) + grpc_server = UserDefinedFunctionServicer(function_handler) grpc_server.start() ``` diff --git a/pyproject.toml b/pyproject.toml index 6b82f0b3..47903a86 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "pynumaflow" -version = "0.2.5" +version = "0.2.6" description = "Provides the interfaces of writing Python User Defined Functions and Sinks for NumaFlow." authors = ["NumaFlow Developers"] readme = "README.md"