Skip to main content

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

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!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dubbo-python3-1.0.3.tar.gz (790.3 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

dubbo_python3-1.0.3-py3.6.egg (46.4 kB view details)

Uploaded Egg

dubbo_python3-1.0.3-py3-none-any.whl (26.5 kB view details)

Uploaded Python 3

File details

Details for the file dubbo-python3-1.0.3.tar.gz.

File metadata

  • Download URL: dubbo-python3-1.0.3.tar.gz
  • Upload date:
  • Size: 790.3 kB
  • Tags: Source
  • Uploaded using 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

File hashes

Hashes for dubbo-python3-1.0.3.tar.gz
Algorithm Hash digest
SHA256 404f5e36b5b28f8a6d624b059d1cfde89d756f989b1f1bfd15f0adc5248e5c3d
MD5 142e99172a25a55d19efbcc8163202fc
BLAKE2b-256 66e2d9c7b89e37a783249fb787b79427bce268cef63fbb21f5e021f9907fb2d5

See more details on using hashes here.

File details

Details for the file dubbo_python3-1.0.3-py3.6.egg.

File metadata

  • Download URL: dubbo_python3-1.0.3-py3.6.egg
  • Upload date:
  • Size: 46.4 kB
  • Tags: Egg
  • Uploaded using 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

File hashes

Hashes for dubbo_python3-1.0.3-py3.6.egg
Algorithm Hash digest
SHA256 1f9c73a1711031a03d17c664333457e691e3928198eaf25861bca65a05a48f03
MD5 5ae867a8cf4d20fc7e2501e8740ea734
BLAKE2b-256 726f93d72258a34ceb7ee4c4b82d9a20b456031f5f982cf8f0259bd32d26c09b

See more details on using hashes here.

File details

Details for the file dubbo_python3-1.0.3-py3-none-any.whl.

File metadata

  • Download URL: dubbo_python3-1.0.3-py3-none-any.whl
  • Upload date:
  • Size: 26.5 kB
  • Tags: Python 3
  • Uploaded using 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

File hashes

Hashes for dubbo_python3-1.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5e7bcceffebf846de0c0c7153327b77f124c7a3328eb7d13a4737fccdffbc5e2
MD5 332b5bd686da1c7f2f7723a05ee4937e
BLAKE2b-256 fbf8c530a1add8a8d1d2edb7f526f6208b14f8aa478503200404812fdcdff95d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page