nacos-sdk-rust-binding-py 0.1.1__cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl → 0.1.2__cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of nacos-sdk-rust-binding-py might be problematic. Click here for more details.

@@ -0,0 +1,249 @@
1
+ Metadata-Version: 2.1
2
+ Name: nacos-sdk-rust-binding-py
3
+ Version: 0.1.2
4
+ Classifier: Programming Language :: Rust
5
+ Classifier: Programming Language :: Python :: Implementation :: CPython
6
+ Classifier: Programming Language :: Python :: Implementation :: PyPy
7
+ Requires-Dist: pdoc ; extra == 'docs'
8
+ Requires-Dist: behave ; extra == 'test'
9
+ Provides-Extra: docs
10
+ Provides-Extra: test
11
+ License-File: LICENSE
12
+ Summary: nacos-sdk-rust binding for Python.
13
+ Keywords: nacos,ffi,pyo3,binding,python
14
+ Author: CheirshCai <785427346@qq.com>
15
+ Author-email: CheirshCai <785427346@qq.com>
16
+ License: Apache-2.0
17
+ Requires-Python: >=3.7
18
+ Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
19
+ Project-URL: Documentation, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
20
+ Project-URL: Homepage, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
21
+ Project-URL: Repository, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
22
+
23
+ # nacos-sdk-rust-binding-py
24
+ nacos-sdk-rust binding for Python with PyO3.
25
+
26
+ Tip: nacos-sdk-python 仓库暂未提供 2.x gRPC 交互模式,为了能升级它,故而通过 ffi 方式调用 nacos-sdk-rust
27
+
28
+ ## Installation
29
+
30
+ ```bash
31
+ pip install nacos-sdk-rust-binding-py
32
+ ```
33
+
34
+ - project package see https://pypi.org/project/nacos-sdk-rust-binding-py
35
+
36
+ ## Usage
37
+
38
+ **使用样例请看仓库内的 examples 目录**
39
+
40
+ - 客户端日志请在目录 `$HOME/logs/nacos/` 查看
41
+
42
+ ### Definition of ClientOptions
43
+
44
+ ```python
45
+ class ClientOptions:
46
+ # Server Addr, e.g. address:port[,address:port],...]
47
+ #[pyo3(set, get)]
48
+ server_addr: String,
49
+ # Namespace/Tenant
50
+ #[pyo3(set, get)]
51
+ namespace: String,
52
+ # AppName
53
+ #[pyo3(set, get)]
54
+ app_name: Option<String>,
55
+ # Username for Auth
56
+ #[pyo3(set, get)]
57
+ username: Option<String>,
58
+ # Password for Auth
59
+ #[pyo3(set, get)]
60
+ password: Option<String>,
61
+
62
+ # Init
63
+ def __init__(self, server_addr, namespace, app_name, username, password):
64
+ self.server_addr = server_addr
65
+ self.server_addr = namespace
66
+ self.app_name = app_name
67
+ self.username = username
68
+ self.password = password
69
+
70
+ ```
71
+
72
+ ### Definition of Config
73
+
74
+ ```python
75
+ class NacosConfigResponse:
76
+ # Namespace/Tenant
77
+ # [pyo3(get)]
78
+ namespace: String,
79
+ # DataId
80
+ # [pyo3(get)]
81
+ data_id: String,
82
+ # Group
83
+ # [pyo3(get)]
84
+ group: String,
85
+ # Content
86
+ # [pyo3(get)]
87
+ content: String,
88
+ # Content's Type; e.g. json,properties,xml,html,text,yaml
89
+ # [pyo3(get)]
90
+ content_type: String,
91
+ # Content's md5
92
+ # [pyo3(get)]
93
+ md5: String,
94
+
95
+
96
+ class NacosConfigClient:
97
+ # Init. If it fails, pay attention to err
98
+ def __init__(self, client_options: ClientOptions):
99
+ # inner logic xxx
100
+ pass
101
+
102
+ # Get config's content. If it fails, pay attention to err
103
+ def get_config(self, data_id: String, group: String) -> String:
104
+ pass
105
+
106
+ # Get NacosConfigResponse. If it fails, pay attention to err
107
+ def get_config_resp(self, data_id: String, group: String) -> NacosConfigResponse:
108
+ pass
109
+
110
+ # Publish config. If it fails, pay attention to err
111
+ def publish_config(self, data_id: String, group: String, content: String) -> bool:
112
+ pass
113
+
114
+ # Remove config. If it fails, pay attention to err
115
+ def remove_config(self, data_id: String, group: String) -> bool:
116
+ pass
117
+
118
+ # Add NacosConfigChangeListener callback func, which listen the config change. If it fails, pay attention to err
119
+ def add_listener(self, data_id: String, group: String, listener: py_function):
120
+ pass
121
+
122
+
123
+ ```
124
+
125
+ ### Definition of Naming
126
+
127
+ ```python
128
+ class NacosServiceInstance:
129
+ # Instance Id
130
+ #[pyo3(set, get)]
131
+ instance_id: Option<String>,
132
+ # Ip
133
+ #[pyo3(set, get)]
134
+ ip: String,
135
+ # Port
136
+ #[pyo3(set, get)]
137
+ port: i32,
138
+ # Weight, default 1.0
139
+ #[pyo3(set, get)]
140
+ weight: Option<f64>,
141
+ # Healthy or not, default true
142
+ #[pyo3(set, get)]
143
+ healthy: Option<bool>,
144
+ # Enabled ot not, default true
145
+ #[pyo3(set, get)]
146
+ enabled: Option<bool>,
147
+ # Ephemeral or not, default true
148
+ #[pyo3(set, get)]
149
+ ephemeral: Option<bool>,
150
+ # Cluster Name, default 'DEFAULT'
151
+ #[pyo3(set, get)]
152
+ cluster_name: Option<String>,
153
+ # Service Name
154
+ #[pyo3(set, get)]
155
+ service_name: Option<String>,
156
+ # Metadata, default '{}'
157
+ #[pyo3(set, get)]
158
+ metadata: Option<std::collections::HashMap<String, String>>,
159
+
160
+ # Init
161
+ def __init__(self, ip, port, weight, healthy, enabled, ephemeral, cluster_name, service_name, metadata):
162
+ # inner logic xxx
163
+ pass
164
+
165
+
166
+ class NacosNamingClient:
167
+ # Init. If it fails, pay attention to err
168
+ def __init__(self, client_options: ClientOptions):
169
+ # inner logic xxx
170
+ pass
171
+
172
+ # Register instance. If it fails, pay attention to err
173
+ def register_instance(self, service_name: String, group: String, service_instance: NacosServiceInstance):
174
+ pass
175
+
176
+ # Deregister instance. If it fails, pay attention to err
177
+ def deregister_instance(self, service_name: String, group: String, service_instance: NacosServiceInstance):
178
+ pass
179
+
180
+ # Batch register instance, improve interaction efficiency. If it fails, pay attention to err
181
+ def batch_register_instance(self, service_name: String, group: String, service_instances: [NacosServiceInstance]):
182
+ pass
183
+
184
+ # Get all instances by service and group. default cluster=[], subscribe=true. If it fails, pay attention to err
185
+ def get_all_instances(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>) -> [NacosServiceInstance]:
186
+ pass
187
+
188
+ # Select instances whether healthy or not. default cluster=[], subscribe=true, healthy=true. If it fails, pay attention to err
189
+ def select_instances(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>, healthy: Option<bool>) -> [NacosServiceInstance]:
190
+ pass
191
+
192
+ # Select one healthy instance. default cluster=[], subscribe=true. If it fails, pay attention to err
193
+ def select_one_healthy_instance(self, service_name: String, group: String, clusters: Option<[String]>, subscribe: Option<bool>) -> NacosServiceInstance:
194
+ pass
195
+
196
+ # Add NacosNamingEventListener callback func, which listen the instance change. If it fails, pay attention to err
197
+ def subscribe(self, service_name: String, group: String, clusters: Option<[String]>, listener: py_function) -> NacosServiceInstance:
198
+ pass
199
+
200
+
201
+ ```
202
+
203
+ ## Development
204
+
205
+ Setup virtualenv:
206
+
207
+ ```shell
208
+ python -m venv venv
209
+ ```
210
+
211
+ Activate venv:
212
+
213
+ ```shell
214
+ source venv/bin/activate
215
+ ````
216
+
217
+ Install `maturin`:
218
+
219
+ ```shell
220
+ pip install maturin[patchelf]
221
+ ```
222
+
223
+ Build bindings:
224
+
225
+ ```shell
226
+ maturin develop
227
+ ```
228
+
229
+ Run some tests:
230
+
231
+ ```shell
232
+ maturin develop -E test
233
+ behave tests
234
+ ```
235
+
236
+ Build API docs:
237
+
238
+ ```shell
239
+ maturin develop -E docs
240
+ pdoc nacos-sdk-rust-binding-py
241
+ ```
242
+
243
+ # License
244
+ [Apache License Version 2.0](LICENSE)
245
+
246
+ # Acknowledgement
247
+ - binding for Python with [PyO3](https://github.com/PyO3/pyo3.git)
248
+ - binding the [nacos-sdk-rust](https://github.com/nacos-group/nacos-sdk-rust.git)
249
+
@@ -0,0 +1,6 @@
1
+ nacos_sdk_rust_binding_py-0.1.2.dist-info/METADATA,sha256=hpq_dzEoozZLRwUDJIbFyZwTtSOLSDRBILHkqUe4eww,7081
2
+ nacos_sdk_rust_binding_py-0.1.2.dist-info/WHEEL,sha256=wYHgTe3HSfvcgUlaHG1XLd2MtfOdQLYaNdFNBnKGeYU,129
3
+ nacos_sdk_rust_binding_py-0.1.2.dist-info/license_files/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
+ nacos_sdk_rust_binding_py/__init__.py,sha256=KQBZgI2Tvj-KFIC7ObI-xwCQrmcYncTxJgANsMNd5UQ,183
5
+ nacos_sdk_rust_binding_py/nacos_sdk_rust_binding_py.cpython-311-arm-linux-gnueabihf.so,sha256=p90eADpV8fimUdHaxSua492a-RvU2si8xgwJ6Hk170w,13818268
6
+ nacos_sdk_rust_binding_py-0.1.2.dist-info/RECORD,,
@@ -1,84 +0,0 @@
1
- Metadata-Version: 2.1
2
- Name: nacos-sdk-rust-binding-py
3
- Version: 0.1.1
4
- Classifier: Programming Language :: Rust
5
- Classifier: Programming Language :: Python :: Implementation :: CPython
6
- Classifier: Programming Language :: Python :: Implementation :: PyPy
7
- Requires-Dist: pdoc ; extra == 'docs'
8
- Requires-Dist: behave ; extra == 'test'
9
- Provides-Extra: docs
10
- Provides-Extra: test
11
- License-File: LICENSE
12
- Summary: nacos-sdk-rust binding for Python.
13
- Keywords: nacos,ffi,pyo3,binding,python
14
- Author: CheirshCai <785427346@qq.com>
15
- Author-email: CheirshCai <785427346@qq.com>
16
- License: Apache-2.0
17
- Requires-Python: >=3.7
18
- Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
19
- Project-URL: Documentation, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
20
- Project-URL: Homepage, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
21
- Project-URL: Repository, https://github.com/opc-source/nacos-sdk-rust-binding-py.git
22
-
23
- # nacos-sdk-rust-binding-py
24
- nacos-sdk-rust binding for Python with PyO3.
25
-
26
- Tip: nacos-sdk-python 仓库暂未提供 2.x gRPC 交互模式,为了能升级它,故而通过 ffi 方式调用 nacos-sdk-rust
27
-
28
- ## Installation
29
-
30
- ```bash
31
- pip install nacos-sdk-rust-binding-py
32
- ```
33
-
34
- # Usage
35
- - see https://pypi.org/project/nacos-sdk-rust-binding-py
36
- - TODO
37
-
38
- ## Development
39
-
40
- Setup virtualenv:
41
-
42
- ```shell
43
- python -m venv venv
44
- ```
45
-
46
- Activate venv:
47
-
48
- ```shell
49
- source venv/bin/activate
50
- ````
51
-
52
- Install `maturin`:
53
-
54
- ```shell
55
- pip install maturin[patchelf]
56
- ```
57
-
58
- Build bindings:
59
-
60
- ```shell
61
- maturin develop
62
- ```
63
-
64
- Run some tests:
65
-
66
- ```shell
67
- maturin develop -E test
68
- behave tests
69
- ```
70
-
71
- Build API docs:
72
-
73
- ```shell
74
- maturin develop -E docs
75
- pdoc nacos-sdk-rust-binding-py
76
- ```
77
-
78
- # License
79
- [Apache License Version 2.0](LICENSE)
80
-
81
- # Acknowledgement
82
- - binding for Python with [PyO3](https://github.com/PyO3/pyo3.git)
83
- - binding the [nacos-sdk-rust](https://github.com/nacos-group/nacos-sdk-rust.git)
84
-
@@ -1,6 +0,0 @@
1
- nacos_sdk_rust_binding_py-0.1.1.dist-info/METADATA,sha256=XDH1IOXTRDwswwdz11aagJBSapkvC9u7Gvl29h31f0E,1881
2
- nacos_sdk_rust_binding_py-0.1.1.dist-info/WHEEL,sha256=wYHgTe3HSfvcgUlaHG1XLd2MtfOdQLYaNdFNBnKGeYU,129
3
- nacos_sdk_rust_binding_py-0.1.1.dist-info/license_files/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
4
- nacos_sdk_rust_binding_py/__init__.py,sha256=KQBZgI2Tvj-KFIC7ObI-xwCQrmcYncTxJgANsMNd5UQ,183
5
- nacos_sdk_rust_binding_py/nacos_sdk_rust_binding_py.cpython-311-arm-linux-gnueabihf.so,sha256=t_i4g2vP4cD36AMZqKYHEoVN-6AyGBaCeeFg9DQobN0,13799072
6
- nacos_sdk_rust_binding_py-0.1.1.dist-info/RECORD,,