Skip to main content

Simple nacos client package

Project description

jupiter-nacos-client

A Simple Nacos client encapsulated based on nacos-sdk-python

Supported Python version

Python 3.7+

Supported Nacos version

Supported Nacos version over 2.x

Installation

pip install jupiter-nacos-client

Register Service

from jupiter_nacos_client import nacos_client

service_name="......"
ip="......"
port=8888
version="1.0.0"

nacos_client.register_service(
    service_name=service_name,
    ip=ip,
    port=port,
    ephemeral=False,
    metadata=f"version={version},type=python"
)

Deregister Service

from jupiter_nacos_client import nacos_client

service_name="......"
ip="......"
port=8888

nacos_client.deregister_service(
    service_name=service_name,
    ip=ip,
    port=port,
    ephemeral=False
)

Get Config From Nacos Server

from jupiter_nacos_client import nacos_client

service_name="......"

APP_CONFIG = nacos_client.get_config(service_name) or {
    "app": {
        "name": "pynacos-fastapi-examples",
        "version": "1.0.0"
    }
}

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

jupiter_nacos_client-1.0.4.tar.gz (10.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jupiter_nacos_client-1.0.4-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file jupiter_nacos_client-1.0.4.tar.gz.

File metadata

  • Download URL: jupiter_nacos_client-1.0.4.tar.gz
  • Upload date:
  • Size: 10.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.0

File hashes

Hashes for jupiter_nacos_client-1.0.4.tar.gz
Algorithm Hash digest
SHA256 d432c0af946e2668d9d4ba92eebbb020f32a3fa98acb0ad782d827b661cdbecb
MD5 558795dbee7b3514887ec8574494e5ca
BLAKE2b-256 04a0b335363ab8318856be51966e54749d83804a7c67648d151807454fbf3282

See more details on using hashes here.

File details

Details for the file jupiter_nacos_client-1.0.4-py3-none-any.whl.

File metadata

File hashes

Hashes for jupiter_nacos_client-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6ea2e2f4251cec206617f7fbd8e9479c861a3f1c831f4c57305a3e1486d8728c
MD5 20f9bec1dced110f46988098811bfe71
BLAKE2b-256 02e99d2b99fac41767870c0e5363798e4d78f2bf678455b8b5866df993c53239

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page