Skip to main content

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

Please use dubbo-rpc-jsonrpc and configure protocol in Dubbo for jsonrpc protocol

Installation

Download code
python setup.py install
pip install
pip install dubbo-python3>=1.0.3 Git install
pip install git+https://github.com/nickfan/dubbo-python3.git@1.0.3

Load balancing on the client side, service discovery

Get the registration information of the service through the zookeeper of the registry.
Dubbo-client-py supports configuring multiple zookeeper service addresses.
“host”:”192.168.1.183:2181,192.168.1.184:2181,192.168.1.185:2181”
Then the load balancing algorithm is implemented by proxy, and the
server is called.
Support Version and Group settings.

### 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

Optimize performance, minimize the impact of service upper and lower lines.
Support Retry parameters
Support weight call
Unit test coverage

### 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!

Metadata

Release files for dubbo-python3 1.0.3

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-python3 1.0.3
File Size Uploaded
dubbo-python3-1.0.3.tar.gz 790.3 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dubbo-python3 1.0.3
File Interpreter ABI Platform
dubbo_python3-1.0.3-py3.6.egg Legacy Egg format - - Details
dubbo_python3-1.0.3-py3-none-any.whl Python 3 none any Details

Total release size: 863.2 kB

Release files / dubbo-python3-1.0.3.tar.gz

Download URL dubbo-python3-1.0.3.tar.gz
Size 790.3 kB
Tags Source
SHA-256 checksum
How to use checksums
404f5e36b5b28f8a6d624b059d1cfde89d756f989b1f1bfd15f0adc5248e5c3d
BLAKE2b-256 checksum
How to use checksums
66e2d9c7b89e37a783249fb787b79427bce268cef63fbb21f5e021f9907fb2d5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

Release files / dubbo_python3-1.0.3-py3.6.egg

Download URL dubbo_python3-1.0.3-py3.6.egg
Size 46.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
1f9c73a1711031a03d17c664333457e691e3928198eaf25861bca65a05a48f03
BLAKE2b-256 checksum
How to use checksums
726f93d72258a34ceb7ee4c4b82d9a20b456031f5f982cf8f0259bd32d26c09b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

Release files / dubbo_python3-1.0.3-py3-none-any.whl

Download URL dubbo_python3-1.0.3-py3-none-any.whl
Size 26.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e7bcceffebf846de0c0c7153327b77f124c7a3328eb7d13a4737fccdffbc5e2
BLAKE2b-256 checksum
How to use checksums
fbf8c530a1add8a8d1d2edb7f526f6208b14f8aa478503200404812fdcdff95d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3.post20200330 requests-toolbelt/0.9.1 tqdm/4.46.0 CPython/3.6.10

Release history Release notifications | RSS feed

This release

1.0.3 This release

3 release files

1.0.2

3 release files

1.0.1

3 release files

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