Scan your whole stack
From OX Research Newsroom
Are you using nacos-sdk-rust-binding-py?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.9.0a0
nacos-sdk-rust-binding-py was last scanned on 28 Nov 2026 at version 0.9.0a0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.9.0a0 LATEST | 28 Nov 2026 | No rules fired |
Findings for v0.9.0a0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.9.0a0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
nacos-sdk-rust binding for Python with PyO3.
Tip: nacos-sdk-python 仓库暂未提供 2.x gRPC 交互模式,为了能升级它,故而通过 ffi 方式调用 nacos-sdk-rust
pip install nacos-sdk-rust-binding-py
使用样例请看仓库内的 examples 目录
其它设置
环境变量 NACOS_CLIENT_LOGGER_LEVEL=INFO 可设置日志打印级别,默认 INFO
$HOME/logs/nacos/ 查看环境变量 NACOS_CLIENT_COMMON_THREAD_CORES=4 可设置客户端核心线程数,默认是 CPU 数目 1
环境变量 NACOS_CLIENT_NAMING_PUSH_EMPTY_PROTECTION=false 可关闭 Naming 防推空保护,默认 true
更多环境变量请看 nacos-sdk-rust 的文档说明
class ClientOptions:
# Server Addr, e.g. address:port[,address:port],...]
#[pyo3(set, get)]
server_addr: String,
# Namespace/Tenant
#[pyo3(set, get)]
namespace: String,
# AppName
#[pyo3(set, get)]
app_name: Option<String>,
# Username for Auth
#[pyo3(set, get)]
username: Option<String>,
# Password for Auth
#[pyo3(set, get)]
password: Option<String>,
# naming push_empty_protection, default true
#[pyo3(set, get)]
naming_push_empty_protection: Option<bool>,
# naming load_cache_at_start, default false
#[pyo3(set, get)]
naming_load_cache_at_start: Option<bool>,
# Init
def __init__(self, server_addr, namespace, app_name, username, password):
self.server_addr = server_addr
self.namespace = namespace
self.app_name = app_name
self.username = username
self.password = password
class NacosConfigResponse:
# Namespace/Tenant
# [pyo3(get)]
namespace: String,
# DataId
# [pyo3(get)]
data_id: String,
# Group
# [pyo3(get)]
group: String,
# Content
# [pyo3(get)]
content: String,
# Content's Type; e.g. json,properties,xml,html,text,yaml
# [pyo3(get)]
content_type: String,
# Content's md5
# [pyo3(get)]
md5: String,
class NacosConfigClient:
# Init. If it fails, pay attention to err
def __init__(self, client_options: ClientOptions):
# inner logic xxx
pass
# Get config's content. If it fails, pay attention to err
def get_config(self, data_id: String, group: String) -> String:
pass
# Get NacosConfigResponse. If it fails, pay attention to err
def get_config_resp(self, data_id: String, group: String) -> NacosConfigResponse:
pass
# Publish config. If it fails, pay attention to err
def publish_config(self, data_id: String, group: String, content: String) -> bool:
pass
# Remove config. If it fails, pay attention to err
def remove_config(self, data_id: String, group: String) -> bool:
pass
# Add NacosConfigChangeListener callback func, which listen the config change. If it fails, pay attention to err
def add_listener(self, data_id: String, group: String, listener: py_function):
pass
class NacosServiceInstance:
# Instance Id
#[pyo3(set, get)]
instance_id: Option<String>,
# Ip
#[pyo3(set, get)]
ip: String,
# Port
#[pyo3(set, get)]
port: i32,
# Weight, default 1.0
#[pyo3(set, get)]
weight: Option<f64>,
# Healthy or not, default true
#[pyo3(set, get)]
healthy: Option<bool>,
# Enabled ot not, default true
#[pyo3(set, get)]
enabled: Option<bool>,
# Ephemeral or not, default true
#[pyo3(set, get)]
ephemeral: Option<bool>,
# Cluster Name, default 'DEFAULT'
#[pyo3(set, get)]
cluster_name: Option<String>,
# Service Name
#[pyo3(set, get)]
service_name: Option<String>,
# Metadata, default '{}'
#[pyo3(set, get)]
metadata: Option<std::collections::HashMap<String, String>>,
# Init
def __init__(self, ip, port, weight, healthy, enabled, ephemeral, cluster_name, service_name, metadata):
# inner logic xxx
pass
class NacosNamingClient:
# Init. If it fails, pay attention to err
def __init__(self, client_options: ClientOptions):
# inner logic xxx
pass
# Register instance. If it fails, pay attention to err
def register_instance(self, service_name: String, group: String, service_instance: NacosServiceInstance):
pass
# Deregister instance. If it fails, pay attention to err
def deregister_instance(self, service_name: String, group: String, service_instance: NacosServiceInstance):
pass
# Batch register instance, improve interaction efficiency. If it fails, pay attention to err
def batch_register_instance(self, service_name: String, group: String, service_instances: [NacosServiceInstance]):
pass
# Get all instances by service and group. default cluster=[], subscribe=true. If it fails, pay attention to err
def get_all_instances(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>) -> [NacosServiceInstance]:
pass
# Select instances whether healthy or not. default cluster=[], subscribe=true, healthy=true. If it fails, pay attention to err
def select_instances(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>, healthy: Option<bool>) -> [NacosServiceInstance]:
pass
# Select one healthy instance. default cluster=[], subscribe=true. If it fails, pay attention to err
def select_one_healthy_instance(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>) -> NacosServiceInstance:
pass
# Add NacosNamingEventListener callback func, which listen the instance change. If it fails, pay attention to err
def subscribe(self, service_name: String, group: String, clusters: Option<[String]>, listener: py_function) -> NacosServiceInstance:
pass
Setup virtualenv:
python -m venv venv
Activate venv:
source venv/bin/activate
Install maturin:
pip install maturin[patchelf]
Build bindings:
maturin develop
Run some tests:
maturin develop -E test
behave tests
Build API docs:
maturin develop -E docs
pdoc nacos-sdk-rust-binding-py
Apache License Version 2.0
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.