uns-kit 0.0.5__py3-none-any.whl → 0.0.6__py3-none-any.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.
uns_kit/cli.py CHANGED
@@ -143,15 +143,22 @@ def create(dest: str):
143
143
  @click.option("--path", default="config.json", show_default=True)
144
144
  def write_config(path: str):
145
145
  data = {
146
- "host": "localhost",
147
- "port": 1883,
148
- "username": "",
149
- "password": "",
150
- "tls": False,
151
- "clientId": "uns-py",
152
- "packageName": "uns-kit",
153
- "packageVersion": "0.0.1",
154
- "processName": "uns-process",
146
+ "infra": {
147
+ "host": "localhost",
148
+ "port": 1883,
149
+ "username": "",
150
+ "password": "",
151
+ "tls": False,
152
+ "clientId": "uns-py",
153
+ "mqttSubToTopics": [],
154
+ "keepalive": 60,
155
+ "clean": True
156
+ },
157
+ "uns": {
158
+ "packageName": "uns-kit",
159
+ "packageVersion": "0.0.1",
160
+ "processName": "uns-process"
161
+ }
155
162
  }
156
163
  Path(path).write_text(json.dumps(data, indent=2))
157
164
  click.echo(f"Wrote {path}")
@@ -36,4 +36,4 @@ The default `main.py` uses `UnsProxyProcess` + `UnsMqttProxy`, which publish:
36
36
  - transformation stats (`.../<instance>/published-message-*`, `.../<instance>/subscribed-message-*`) every 60s
37
37
 
38
38
  ## Config
39
- Edit `config.json` with your MQTT host/auth.
39
+ Edit `config.json` with your MQTT host/auth (TS-style nested infra/uns structure).
@@ -8,9 +8,7 @@ from uns_kit import UnsConfig, UnsMqttClient, TopicBuilder
8
8
 
9
9
  def load_config() -> UnsConfig:
10
10
  cfg_path = Path("config.json")
11
- if cfg_path.exists():
12
- return UnsConfig.load(cfg_path)
13
- return UnsConfig(host="localhost")
11
+ return UnsConfig.load(cfg_path)
14
12
 
15
13
 
16
14
  def simulate_sensor_value(step: int) -> float:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: uns-kit
3
- Version: 0.0.5
3
+ Version: 0.0.6
4
4
  Summary: Lightweight Python UNS MQTT client (pub/sub + infra topics)
5
5
  License: MIT
6
6
  Author: Aljoša Vister
@@ -1,19 +1,19 @@
1
1
  uns_kit/__init__.py,sha256=oLhYBOJkoYXBJGN7VDtJpMXAb1v5qFVphun5QgFwthw,564
2
- uns_kit/cli.py,sha256=USq7bHl6sL75s--Y_nV2j7v1JScZWehZp92GyqYgjyw,5552
2
+ uns_kit/cli.py,sha256=J6TKYeBC0WB_OsLboehMBkedb16Y0w3cuDXhk3a6QUY,5734
3
3
  uns_kit/client.py,sha256=GjlGOTPuaxeLlgkfcJWpxMId6nLeZNsZTNBfOYAe8YY,14892
4
4
  uns_kit/config.py,sha256=K9FIvFB_zk59I_9XW5PA7sDRJOMl-5-3VCHbpyLgxyM,2899
5
5
  uns_kit/packet.py,sha256=M-JJ0--FVe-iFPGnBUFynx_0iKB9F3NFwvETJ7yKibc,5874
6
6
  uns_kit/proxy.py,sha256=H1Afs71rdb7DTHYp_8qeoM8uN5vOvAzYK50u9JszXQQ,2338
7
7
  uns_kit/proxy_process.py,sha256=If8HXd_YAf1xYjzy8BA73Jo0DRh0-3WpHHIoVcIbS-Q,3906
8
8
  uns_kit/status_monitor.py,sha256=8XXBaUHh8SW7gX4d3EtChnEkgQ7rnQ14tEHb0jDB25I,3022
9
- uns_kit/templates/default/README.md,sha256=V8HXk3MxL9Aq21lm-zt8WOK7n3pDBI4CMrvtRYOPPK4,1213
9
+ uns_kit/templates/default/README.md,sha256=5_o_xowRuzHtn3NzibO-Ysq6iTTAuYbvtTFn27dH-yU,1251
10
10
  uns_kit/templates/default/pyproject.toml,sha256=JT2gYvmofwBuS7FI7U0i_5U3TzyiXrwU6w-bz-cTvKU,540
11
11
  uns_kit/templates/default/src/data_example.py,sha256=8D1CyGVsbeKzZV79l8zaX-hqz_gxrA_ps2TA-GwzLQI,4381
12
- uns_kit/templates/default/src/load_test.py,sha256=cmQ3FzakBisLJU5TTNVpHpfdnIoA32c2pN7dnEwlfgo,3359
12
+ uns_kit/templates/default/src/load_test.py,sha256=SjhycCOTz2Aw2si50iYGO8wHeQ9F_tFCMqLBALuEyJA,3290
13
13
  uns_kit/topic_builder.py,sha256=UYC2SS9ptHopeyQ3ud1HEg1IHr5RJ7X2DEkfZC1CM5Y,1938
14
14
  uns_kit/uns_mqtt_proxy.py,sha256=QzG0E42r7n33Z4Ri70-DxTlVoM-wj0_wAtnbMyaet08,9831
15
15
  uns_kit/version.py,sha256=vmk-z_o25XOVgX5lSUrECllqau8NL7B_pkKsSmwhmX0,247
16
- uns_kit-0.0.5.dist-info/METADATA,sha256=VZ2JjJ_7twYxRtrSEURUXfPKsdSiqhGKuVIH08Zrg-M,3306
17
- uns_kit-0.0.5.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
18
- uns_kit-0.0.5.dist-info/entry_points.txt,sha256=sLvTioiJQfGczUD-ODVx2xwwtHcGKjlIOn8t_Lt87Pg,47
19
- uns_kit-0.0.5.dist-info/RECORD,,
16
+ uns_kit-0.0.6.dist-info/METADATA,sha256=HCwSvEURWhcRDB7noKwtNt72AL639ZAUlJK5r8XPX0c,3306
17
+ uns_kit-0.0.6.dist-info/WHEEL,sha256=3ny-bZhpXrU6vSQ1UPG34FoxZBp3lVcvK0LkgUz6VLk,88
18
+ uns_kit-0.0.6.dist-info/entry_points.txt,sha256=sLvTioiJQfGczUD-ODVx2xwwtHcGKjlIOn8t_Lt87Pg,47
19
+ uns_kit-0.0.6.dist-info/RECORD,,