python sdk for nacos
Project description
xadnacos
xadnacos是一个用来调用naccos的sdk, 基于KcangNacos进行修改
参考: * https://github.com/KcangYan/nacos-python-sdk.git
Free software: MIT license
文档
导入dkimageapp库:
from xadnacos import xadnacos as nacos
创建nacos连接对象:
nacosServer = nacos.nacos(ip=nacosIp,port=nacosPort)
将本地配置注入到nacos对象中即可获取远程配置:
GlobalConfig={}
nacosServer.config(dataId="demo-python.json",group="dev",tenant="python",myConfig=GlobalConfig)
注册nacos服务:
serverHost = socket.gethostbyname(socket.gethostname())
metadata = {
"tier": "backend",
"projectid": "THID89782455-HJ45678963"
}
clusterName = myConfig.region
nacosServer.registerService(serviceIp=serverHost,servicePort=myConfig.port,serviceName="python-provider",
namespaceId="python",groupName="dev",clusterName=clusterName,metadata=metadata)
开启监听配置线程和服务注册心跳进程的健康检查进程:
nacosServer.healthyCheck()
Features
TODO
Credits
This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.
History
0.1.0 (2023-02-04)
First release on PyPI.
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file xadnacos-0.1.3.tar.gz.
File metadata
- Download URL: xadnacos-0.1.3.tar.gz
- Upload date:
- Size: 12.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4e6df5673fa0200663c25e9d2a7815e837f21ea237912c7698aab2808a25f30e
|
|
| MD5 |
fc781241c4ed9064853d097122fd362f
|
|
| BLAKE2b-256 |
052627355671499d53910b53e45e57c6d124e02ec8fbed1c69f8f526d8e519a6
|
File details
Details for the file xadnacos-0.1.3-py2.py3-none-any.whl.
File metadata
- Download URL: xadnacos-0.1.3-py2.py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.10.1 urllib3/1.26.12 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
031bcb5e8a9af98abafb5a2de84b99284322484585a463477b29a3e13a927535
|
|
| MD5 |
ee7b055edf3bd0174e6fba9d26c939a6
|
|
| BLAKE2b-256 |
da31a284a4761385fea780aa0179e637732c4f0b13dd6bd0ec44ee80e762fe8d
|