Python3 Dubbo Client
Project description
Python Client For Apache Dubbo
Achieve load balancing on the client side、auto discovery service function with Zookeeper
Python calls the Dubbo interface’s jsonrpc protocol
Installation
Load balancing on the client side, service discovery
### Example config = ApplicationConfig(‘test_rpclib’) service_interface = ‘com.ofpay.demo.api.UserProvider’ #Contains a connection to zookeeper, which needs caching. 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 as client_error: print(client_error) time.sleep(5)
TODO
### Licenses Apache License ### Thanks Thank @jingpeicomp for being a Guinea pig. It has been running normally for several months in the production environment. Thank you!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for dubbo_python3-1.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 291a090870b0ec968e5802799babcc67bf8d904c7335e5576edb496071e8dac9 |
|
MD5 | d753e807c86d7c8fc231902420cb0ce4 |
|
BLAKE2b-256 | 548df52b409ee0124a7dd8bdedbd0ab987195cb96930a0cb5499abb1d0958cbb |