# apollo-client-python
## 入门使用:
* 见demo目录
## 功能点:
* apollo配置中心拉取配置
* 支持回调接口
* secret认证
* 支持灰度发布
* 支持本地文件缓存
* 默认开启热更新,参数配置可以不开启热更新
* 同时支持python2.x和python3.x,详情见./apollo/下的python_2x.py和python_3x.py文件
## 注意点:
* 【已经废弃,换为不带缓存接口,原因见代码更新】本项目获取配置使用的是缓存接口,而非实时拉取数据库接口,详情见:https://github.com/ctripcorp/apollo/wiki/%E5%85%B6%E5%AE%83%E8%AF%AD%E8%A8%80%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97
## 代码更新
* 修改实例化方法ApolloClient,在内部默认启动异步热更新线程,可以通过参数配置不开启热更新。(2020.09.15)
* 修复停机阻塞问题。
* 增加回调接口,增加secret认证,增加demo
* 修改获取配置的接口改为不带缓存的接口。如果使用缓存接口,config有多个节点的时候,可能A通知更新,但是B的缓存没有更新到。
* 增加心跳机制。增加心跳机制,如果不增加心跳机制,apollo的ui界面可能看不到实例。
* 2021-03-23 修复创建文件夹异常,1.py2并发创建文件夹会抛出异常
Raw data
{
"_id": null,
"home_page": "",
"name": "xx-apollo",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7",
"maintainer_email": "",
"keywords": "xx-apollo",
"author": "yuanjie",
"author_email": "313303303@qq.com",
"download_url": "https://files.pythonhosted.org/packages/22/00/6e3bb7235c10b1d077cbaec291732424e97d936399436b9890cb25cd050d/xx-apollo-2023.7.14.17.23.16.tar.gz",
"platform": null,
"description": "# apollo-client-python\n\n\n## \u5165\u95e8\u4f7f\u7528:\n\n* \u89c1demo\u76ee\u5f55\n\n## \u529f\u80fd\u70b9\uff1a\n* apollo\u914d\u7f6e\u4e2d\u5fc3\u62c9\u53d6\u914d\u7f6e\n* \u652f\u6301\u56de\u8c03\u63a5\u53e3\n* secret\u8ba4\u8bc1\n* \u652f\u6301\u7070\u5ea6\u53d1\u5e03\n* \u652f\u6301\u672c\u5730\u6587\u4ef6\u7f13\u5b58\n* \u9ed8\u8ba4\u5f00\u542f\u70ed\u66f4\u65b0\uff0c\u53c2\u6570\u914d\u7f6e\u53ef\u4ee5\u4e0d\u5f00\u542f\u70ed\u66f4\u65b0\n* \u540c\u65f6\u652f\u6301python2.x\u548cpython3.x\uff0c\u8be6\u60c5\u89c1./apollo/\u4e0b\u7684python_2x.py\u548cpython_3x.py\u6587\u4ef6\n\n## \u6ce8\u610f\u70b9:\n* \u3010\u5df2\u7ecf\u5e9f\u5f03,\u6362\u4e3a\u4e0d\u5e26\u7f13\u5b58\u63a5\u53e3,\u539f\u56e0\u89c1\u4ee3\u7801\u66f4\u65b0\u3011\u672c\u9879\u76ee\u83b7\u53d6\u914d\u7f6e\u4f7f\u7528\u7684\u662f\u7f13\u5b58\u63a5\u53e3\uff0c\u800c\u975e\u5b9e\u65f6\u62c9\u53d6\u6570\u636e\u5e93\u63a5\u53e3\uff0c\u8be6\u60c5\u89c1\uff1ahttps://github.com/ctripcorp/apollo/wiki/%E5%85%B6%E5%AE%83%E8%AF%AD%E8%A8%80%E5%AE%A2%E6%88%B7%E7%AB%AF%E6%8E%A5%E5%85%A5%E6%8C%87%E5%8D%97\n\n## \u4ee3\u7801\u66f4\u65b0\n* \u4fee\u6539\u5b9e\u4f8b\u5316\u65b9\u6cd5ApolloClient\uff0c\u5728\u5185\u90e8\u9ed8\u8ba4\u542f\u52a8\u5f02\u6b65\u70ed\u66f4\u65b0\u7ebf\u7a0b\uff0c\u53ef\u4ee5\u901a\u8fc7\u53c2\u6570\u914d\u7f6e\u4e0d\u5f00\u542f\u70ed\u66f4\u65b0\u3002(2020.09.15)\n* \u4fee\u590d\u505c\u673a\u963b\u585e\u95ee\u9898\u3002\n* \u589e\u52a0\u56de\u8c03\u63a5\u53e3\uff0c\u589e\u52a0secret\u8ba4\u8bc1\uff0c\u589e\u52a0demo\n* \u4fee\u6539\u83b7\u53d6\u914d\u7f6e\u7684\u63a5\u53e3\u6539\u4e3a\u4e0d\u5e26\u7f13\u5b58\u7684\u63a5\u53e3\u3002\u5982\u679c\u4f7f\u7528\u7f13\u5b58\u63a5\u53e3\uff0cconfig\u6709\u591a\u4e2a\u8282\u70b9\u7684\u65f6\u5019\uff0c\u53ef\u80fdA\u901a\u77e5\u66f4\u65b0\uff0c\u4f46\u662fB\u7684\u7f13\u5b58\u6ca1\u6709\u66f4\u65b0\u5230\u3002\n* \u589e\u52a0\u5fc3\u8df3\u673a\u5236\u3002\u589e\u52a0\u5fc3\u8df3\u673a\u5236\uff0c\u5982\u679c\u4e0d\u589e\u52a0\u5fc3\u8df3\u673a\u5236\uff0capollo\u7684ui\u754c\u9762\u53ef\u80fd\u770b\u4e0d\u5230\u5b9e\u4f8b\u3002\n* 2021-03-23 \u4fee\u590d\u521b\u5efa\u6587\u4ef6\u5939\u5f02\u5e38\uff0c1.py2\u5e76\u53d1\u521b\u5efa\u6587\u4ef6\u5939\u4f1a\u629b\u51fa\u5f02\u5e38\n",
"bugtrack_url": null,
"license": "MIT license",
"summary": "Create a Python package.",
"version": "2023.7.14.17.23.16",
"project_urls": null,
"split_keywords": [
"xx-apollo"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "4e4faf79598be5ec4470f830bc70a1bd4cc94f5b11f2af5d3f2cc073706b8cb4",
"md5": "916213ba47ff4969fa827b08e552b809",
"sha256": "2a5856e1a0e5e8cf5a456155c60c9735370990c8050b25f2be7de05cbfde1f9e"
},
"downloads": -1,
"filename": "xx_apollo-2023.7.14.17.23.16-py3-none-any.whl",
"has_sig": false,
"md5_digest": "916213ba47ff4969fa827b08e552b809",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.7",
"size": 7673,
"upload_time": "2023-07-14T09:23:19",
"upload_time_iso_8601": "2023-07-14T09:23:19.244236Z",
"url": "https://files.pythonhosted.org/packages/4e/4f/af79598be5ec4470f830bc70a1bd4cc94f5b11f2af5d3f2cc073706b8cb4/xx_apollo-2023.7.14.17.23.16-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "22006e3bb7235c10b1d077cbaec291732424e97d936399436b9890cb25cd050d",
"md5": "f9f5e3828201f7b5f18ba79f6a92c933",
"sha256": "c04e1e61cb1816b1d22c1143275331f8645095140edcca4041048a92399a4450"
},
"downloads": -1,
"filename": "xx-apollo-2023.7.14.17.23.16.tar.gz",
"has_sig": false,
"md5_digest": "f9f5e3828201f7b5f18ba79f6a92c933",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7",
"size": 8904,
"upload_time": "2023-07-14T09:23:20",
"upload_time_iso_8601": "2023-07-14T09:23:20.940060Z",
"url": "https://files.pythonhosted.org/packages/22/00/6e3bb7235c10b1d077cbaec291732424e97d936399436b9890cb25cd050d/xx-apollo-2023.7.14.17.23.16.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-07-14 09:23:20",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "xx-apollo"
}