kedis-python 0.1.2__tar.gz → 0.1.3__tar.gz
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.
- {kedis_python-0.1.2 → kedis_python-0.1.3}/PKG-INFO +1 -1
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/main.py +34 -1
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/server.py +5 -1
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/PKG-INFO +1 -1
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/entry_points.txt +1 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/pyproject.toml +2 -1
- {kedis_python-0.1.2 → kedis_python-0.1.3}/LICENSE +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/README.md +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/__init__.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/benchmark.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/benchmark_asyncio.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/commands.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/kesp_cli.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/network.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/parser.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/replica.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/simulator.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/skiplist.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/store.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python/ui.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/SOURCES.txt +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/dependency_links.txt +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/requires.txt +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/kedis_python.egg-info/top_level.txt +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/setup.cfg +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_bench.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_kesp.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_kesp2.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_lists.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_lru.py +0 -0
- {kedis_python-0.1.2 → kedis_python-0.1.3}/tests/test_replica.py +0 -0
|
@@ -97,6 +97,7 @@ class KedisClient:
|
|
|
97
97
|
"INFO",
|
|
98
98
|
"HELP",
|
|
99
99
|
"DEBUG",
|
|
100
|
+
"DISCONNECT",
|
|
100
101
|
"RECONNECT",
|
|
101
102
|
"CLEAR",
|
|
102
103
|
"CLS",
|
|
@@ -173,6 +174,7 @@ class KedisClient:
|
|
|
173
174
|
"INFO",
|
|
174
175
|
"HELP",
|
|
175
176
|
"DEBUG",
|
|
177
|
+
"DISCONNECT",
|
|
176
178
|
"RECONNECT",
|
|
177
179
|
"CLEAR",
|
|
178
180
|
"CLS",
|
|
@@ -310,6 +312,36 @@ class KedisClient:
|
|
|
310
312
|
console.print(f"\n[dim]🔧 Diagnostic telemetry is now {status}[/dim]\n")
|
|
311
313
|
return True
|
|
312
314
|
|
|
315
|
+
if cmd == "DISCONNECT":
|
|
316
|
+
if self.local_mode:
|
|
317
|
+
UI.print_panel(
|
|
318
|
+
"[white]You are already in Standalone Mode.[/white]",
|
|
319
|
+
"⚠ NETWORK STATUS",
|
|
320
|
+
"yellow",
|
|
321
|
+
)
|
|
322
|
+
else:
|
|
323
|
+
console.print("[dim]Closing TCP network connection...[/dim]")
|
|
324
|
+
self.network.disconnect()
|
|
325
|
+
|
|
326
|
+
# Manual disconnect means the user wants to STAY local —
|
|
327
|
+
# suppress the radar so it doesn't immediately nag them
|
|
328
|
+
# back to TCP mode the moment it sees the server again.
|
|
329
|
+
self.suppress_reconnect = True
|
|
330
|
+
|
|
331
|
+
if self.store is None:
|
|
332
|
+
self._init_local_engine()
|
|
333
|
+
else:
|
|
334
|
+
self.local_mode = True
|
|
335
|
+
|
|
336
|
+
UI.print_panel(
|
|
337
|
+
"[bold yellow]✓ Disconnected from Kedis TCP Engine[/bold yellow]\n"
|
|
338
|
+
"[white]Mode: Standalone (Local Disk)[/white]\n"
|
|
339
|
+
"[dim]Reconnect radar disabled — use RECONNECT to resume TCP mode.[/dim]",
|
|
340
|
+
"🔌 CONNECTION CLOSED",
|
|
341
|
+
"yellow",
|
|
342
|
+
)
|
|
343
|
+
return True
|
|
344
|
+
|
|
313
345
|
if cmd == "RECONNECT":
|
|
314
346
|
if not self.local_mode:
|
|
315
347
|
UI.print_panel(
|
|
@@ -474,6 +506,7 @@ class KedisClient:
|
|
|
474
506
|
" [yellow]INFO[/yellow] : View engine telemetry and version\n"
|
|
475
507
|
" [yellow]HELP[/yellow] : Show this command reference\n"
|
|
476
508
|
" [yellow]DEBUG[/yellow] : Toggle diagnostic logs\n"
|
|
509
|
+
" [yellow]DISCONNECT[/yellow] : Manually drop TCP link, go Standalone\n"
|
|
477
510
|
" [yellow]RECONNECT[/yellow] : Manually reconnect to TCP server\n"
|
|
478
511
|
" [yellow]STATS[/yellow] : Deep Memory Map\n"
|
|
479
512
|
" [yellow]CONFIG[/yellow] : Hot-swap engine dials mid-flight\n"
|
|
@@ -645,7 +678,7 @@ class KedisClient:
|
|
|
645
678
|
return "(connection closed)"
|
|
646
679
|
|
|
647
680
|
try:
|
|
648
|
-
#
|
|
681
|
+
# FIX: Safely handle both raw bytes and pre-decoded text strings
|
|
649
682
|
text = (
|
|
650
683
|
raw_bytes.decode("utf-8")
|
|
651
684
|
if isinstance(raw_bytes, bytes)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "kedis-python"
|
|
7
|
-
version = "0.1.
|
|
7
|
+
version = "0.1.3"
|
|
8
8
|
description = "A Redis-inspired in-memory store in Python."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
requires-python = ">=3.9"
|
|
@@ -24,6 +24,7 @@ Homepage = "https://github.com/Hogwarts-coder10/kedis-python"
|
|
|
24
24
|
|
|
25
25
|
[project.scripts]
|
|
26
26
|
kedis-cli = "kedis_python.main:main"
|
|
27
|
+
kedis-server = "kedis_python.server:run"
|
|
27
28
|
|
|
28
29
|
[tool.setuptools.packages.find]
|
|
29
30
|
include = ["kedis_python*"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|