Skip to main content

pynacos-sdk

pypi Codacy Badge

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)

Source distribution for pynacos-sdk 0.4.1
File Size Uploaded
pynacos-sdk-0.4.1.tar.gz 9.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pynacos-sdk 0.4.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.4.1 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

1 release file

0.2.1

1 release file

0.2

1 release file

0.1.0

1 release file

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