Skip to content

foxliu/best-apollo-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyApollo - Python Client for Ctrip's Apollo

License

方便Python接入配置中心框架 Apollo 所开发的Python版本客户端。 Tested with python 3.7

Installation

pip install bp-apollo-client

Usage

  • 启动客户端长连接监听
client = ApolloClient(app_id=<appId>, cluster=<clusterName>, config_server_url=<configServerUrl>)
client.client.add_callback_funcs(<cb_funs>)  # 添加回调函数,回调函数接收一个参数为当前appId的配置
client.start()
  • 获取Apollo的配置
    client.get_value(Key, DefaultValue)
    

Contribution

License

The project is licensed under the Apache 2 license.

Reference

Apollo : https://github.com/ctripcorp/apollo

About

Apollo client for python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages