Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Python Dubbo Client
=====================================
实现客户端的负载均衡、配合Zookeeper自动发现服务功能
-------------------------------------


### Python调用Dubbo接口的jsonrpc协议
请使用dubbo-rpc-jsonrpc 并在dubbo中配置protocol为jsonrpc协议
参考 https://github.com/ofpay/dubbo-rpc-jsonrpc

### 安装
下载代码
python setup.py install
pip安装
pip install dubbo-client==1.0.0b5
Git安装
pip install git+http://git.dev.qianmi.com/tda/dubbo-client-py.git@1.0.0b5
或者
pip install git+https://github.com/ofpay/dubbo-client-py.git@1.0.0b5

### 在客户端实现负载均衡,服务发现
通过注册中心的zookeeper,获取服务的注册信息
然后通过代理实现负载均衡算法,调用服务端
支持Version、Group设置

### Example
```python
config = ApplicationConfig('test_rpclib')
service_interface = 'com.ofpay.demo.api.UserProvider'
#registry包含了和zookeeper的连接,该对象需要缓存
registry = ZookeeperRegistry('192.168.59.103:2181', config)
user_provider = DubboClient(service_interface, registry, version='1.0')
for i in range(1000):
try:
print user_provider.getUser('A003')
print user_provider.queryUser(
{u'age': 18, u'time': 1428463514153, u'sex': u'MAN', u'id': u'A003', u'name': u'zhangsan'})
print user_provider.queryAll()
print user_provider.isLimit('MAN', 'Joe')
print user_provider('getUser', 'A005')

except DubboClientError, client_error:
print client_error
time.sleep(5)
```

### TODO
优化性能,将服务上下线的影响降到最小
支持Retry参数
支持权重调用
单元测试覆盖率

### Licenses
MIT License

Metadata

Release files for dubbo-client 1.0.0b5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dubbo-client 1.0.0b5
File Size Uploaded Provenance Actions
dubbo-client-1.0.0b5.tar.gz 9.4 kB Without provenance Details for dubbo-client-1.0.0b5.tar.gz

Release files / dubbo-client-1.0.0b5.tar.gz

Download URL dubbo-client-1.0.0b5.tar.gz
Size 9.4 kB
Tags Source
SHA-256 checksum
How to use checksums
452d8a7ad57bf131fc98d252173230d5cf6506bb576acb09d06fd1e9120494e8
BLAKE2b-256 checksum
How to use checksums
fea63acfcec72de171a56ebc3beee796da5d7848d5a93c63eaa8eb957abf4371
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for dubbo-client 1.0.0b5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page