Skip to main content

xadnacos

https://img.shields.io/pypi/v/xadnacos.svg https://img.shields.io/travis/KONE-XAD/xadnacos.svg Documentation Status

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.

Release files for xadnacos 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for xadnacos 0.1.3
File Size Uploaded
xadnacos-0.1.3.tar.gz 12.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for xadnacos 0.1.3
File Interpreter ABI Platform
xadnacos-0.1.3-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 19.9 kB

Release files / xadnacos-0.1.3.tar.gz

Download URL xadnacos-0.1.3.tar.gz
Size 12.2 kB
Tags Source
SHA-256 checksum
How to use checksums
4e6df5673fa0200663c25e9d2a7815e837f21ea237912c7698aab2808a25f30e
BLAKE2b-256 checksum
How to use checksums
052627355671499d53910b53e45e57c6d124e02ec8fbed1c69f8f526d8e519a6
Upload date
Uploaded using Trusted Publishing?
What is 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

Release files / xadnacos-0.1.3-py2.py3-none-any.whl

Download URL xadnacos-0.1.3-py2.py3-none-any.whl
Size 7.7 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
031bcb5e8a9af98abafb5a2de84b99284322484585a463477b29a3e13a927535
BLAKE2b-256 checksum
How to use checksums
da31a284a4761385fea780aa0179e637732c4f0b13dd6bd0ec44ee80e762fe8d
Upload date
Uploaded using Trusted Publishing?
What is 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

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page