From 5a942ad9d6035b1b85003661eeaf9ec0214f6562 Mon Sep 17 00:00:00 2001 From: webbrain-one <295484252+webbrain-one@users.noreply.github.com> Date: Fri, 7 Aug 2026 17:06:55 +0300 Subject: [PATCH] docs: add English README Generated by qwen3.6-35b-a3b via local API. --- README.en-US.md | 77 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 README.en-US.md diff --git a/README.en-US.md b/README.en-US.md new file mode 100644 index 0000000..bf103bd --- /dev/null +++ b/README.en-US.md @@ -0,0 +1,77 @@ + + +PyDubbo +======= + +A Python client for invoking Dubbo services. + +Protocol Support +------------ +Since Dubbo supports multiple protocol extensions, currently only the default Dubbo protocol (dubbo + hessian2) is supported. +Support for other protocols will be added gradually. + +Installation +-------- + +Runtime Environment +----------- +Due to the restrictions of the Dubbo protocol, remote calls require a list of parameter types for the interface. Therefore, the client needs to read the Java class files of the Dubbo interface to obtain the parameter type list. + +Example +---------- + config = { 'classpath' : '%classpath%' } + client = Dubbo((('localhost', 20880),), config) + remoteService = client.getProxy('com.test.RemoteService') + + print remoteService.getTestInfo(123) + +Java Object Related +---------------- +When the interface input/output requires a Java Class, use an instance of Object. + +Configuration Reference +----------- +The `config` parameter of the Dubbo object contains extensive settings. Currently supported configurations are as follows: + +### owner +Specifies the owner of the Dubbo client. +### customer +Specifies the customer name of the Dubbo client. +### classpath +Specifies the path to the Java class files corresponding to the Dubbo remote interface, separated by colons or semicolons. +`JAR` format is supported. +This parameter is optional; you can specify it via the environment variable `PD_CLASSPATH` instead. The `config` parameter takes precedence over the environment variable. +### reference +A dictionary containing detailed configurations for each specific interface. +`'interfaceName' : referenceConfig` + +referenceConfig Reference +----------------------- +### async +Specifies whether the interface call is asynchronous. Example usage: + remoteService.getTestInfo(123) + future1 = RpcContext.future + remoteService.getTestInfo(124) + future2 = RpcContext.future + + result1 = future1.get() + result2 = future2.get() + +### withReturn +Specifies whether to wait for the return value of the interface. If set to False, it will not wait for the interface to return. + +### method +A dictionary containing specific configurations for each method in the interface. +`'methodName' : methodConfig` + +### timeout +Timeout for interface calls, in seconds. Can be a floating-point number. + +methodConfig Reference +---------------------- +### async +Same as `async` in `referenceConfig`. +### withReturn +Same as `withReturn` in `referenceConfig`. +### timeout +Same as `timeout` in `referenceConfig`.