Skip to content

tomwei7/discovery-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

discovery-client

CircleCI PyPI version

python client for discovery https://github.com/bilibili/discovery only support python3.

Install

pip install python-discovery-client

Usage

from discovery import config_from_env, Client


# register instance
client = Client(config_from_env('127.0.0.1:7771')) # use you discovery domain
client.register('your app name', ['http://127.0.0.1:8000'])

# watch instance
def watch_callback(instances):
    print('instance change: %s', instances)

client.watch('your app name', watch_callback)

client.stop()

Releases

No releases published

Packages

No packages published