pynacos-sdk
Install
pip install pynacos-sdk
Tutorial
from nacos import Nacos
from nacos.errors import RequestError, ParamError
from nacos.params import ServiceRegisterParam, ServiceListParam
NACOS_HOST = "127.0.0.1"
NACOS_PORT = 8848
NAMESPACE_ID = "e26e7439-e161-4709-8778-ab5ecef5fec5"
nacos = Nacos(NACOS_HOST, NACOS_PORT, NAMESPACE_ID)
try:
param = ServiceRegisterParam("hello")
status = nacos.service_register(param)
print("register status = ", status)
except ParamError as e:
print("param error")
print(e)
except RequestError as e:
print("nacos error")
print(e)
try:
param = ServiceListParam()
services = nacos.service_list(param)
print(services.json())
except ParamError as e:
print("param error")
print(e)
except RequestError as e:
print("nacos error")
print(e)
Metadata
Release files for pynacos-sdk 0.4.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pynacos-sdk-0.4.1.tar.gz | 9.2 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pynacos_sdk-0.4.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 18.6 kB
Release files / pynacos-sdk-0.4.1.tar.gz
| Download URL | pynacos-sdk-0.4.1.tar.gz |
|---|---|
| Size | 9.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
531ff8989986615c53819734e6eb7609651c0068f287f51457566e6d62d84e41
|
|
BLAKE2b-256 checksum How to use checksums |
83cfa3661466ce77dc398f52b04a984867c334f179b779ca24103163dfca749d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|
Release files / pynacos_sdk-0.4.1-py3-none-any.whl
| Download URL | pynacos_sdk-0.4.1-py3-none-any.whl |
|---|---|
| Size | 9.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d47f87f24e5bed9e5215cf202e335e6add333af96a4e6b91547fe737908ac5ee
|
|
BLAKE2b-256 checksum How to use checksums |
73d7261c8ca498295b6c6d90125bd648db6975e6874a95c8e25388bcea495c80
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1
|