fluxdeck 0.2.0__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.
- fluxdeck-0.2.0/LICENSE +21 -0
- fluxdeck-0.2.0/PKG-INFO +64 -0
- fluxdeck-0.2.0/README.md +52 -0
- fluxdeck-0.2.0/fluxdeck/__init__.py +0 -0
- fluxdeck-0.2.0/fluxdeck/core.py +73 -0
- fluxdeck-0.2.0/fluxdeck.egg-info/PKG-INFO +64 -0
- fluxdeck-0.2.0/fluxdeck.egg-info/SOURCES.txt +10 -0
- fluxdeck-0.2.0/fluxdeck.egg-info/dependency_links.txt +1 -0
- fluxdeck-0.2.0/fluxdeck.egg-info/requires.txt +1 -0
- fluxdeck-0.2.0/fluxdeck.egg-info/top_level.txt +2 -0
- fluxdeck-0.2.0/pyproject.toml +22 -0
- fluxdeck-0.2.0/setup.cfg +4 -0
fluxdeck-0.2.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Gideon Wamalwa
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
fluxdeck-0.2.0/PKG-INFO
ADDED
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fluxdeck
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Dynamic terminal state renderer using Rich
|
|
5
|
+
Author-email: Gideon Wamalwa <bond8865@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: rich
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# FluxDeck
|
|
14
|
+
|
|
15
|
+
FluxDeck is a lightweight Python utility for dynamically managing and rendering structured console output without clutter. It acts as a simple in-terminal state dashboard that continuously updates displayed information in real time.
|
|
16
|
+
|
|
17
|
+
It is built using Python threading and Rich’s live rendering system.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- Dynamic category-based message tracking
|
|
24
|
+
- Live console updates without manual clearing
|
|
25
|
+
- Muting and unmuting of output categories
|
|
26
|
+
- Threaded rendering loop for continuous display updates
|
|
27
|
+
- Lightweight design with minimal dependencies
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Requirements
|
|
33
|
+
- Python 3.8+
|
|
34
|
+
- rich
|
|
35
|
+
|
|
36
|
+
Install dependency:
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Example Usage
|
|
41
|
+
|
|
42
|
+
This example demonstrates how FluxDeck updates and controls dynamic console output.
|
|
43
|
+
|
|
44
|
+
```python id="r2"
|
|
45
|
+
from fluxdeck import FluxDeck
|
|
46
|
+
import time
|
|
47
|
+
|
|
48
|
+
flux = FluxDeck()
|
|
49
|
+
|
|
50
|
+
# Initial system state
|
|
51
|
+
flux.flux("status", "Initializing system")
|
|
52
|
+
flux.flux("network", "Connected")
|
|
53
|
+
|
|
54
|
+
time.sleep(2)
|
|
55
|
+
|
|
56
|
+
# Update state dynamically
|
|
57
|
+
flux.flux("status", "Running")
|
|
58
|
+
flux.mute("network")
|
|
59
|
+
|
|
60
|
+
time.sleep(2)
|
|
61
|
+
|
|
62
|
+
# Restore and update a muted category
|
|
63
|
+
flux.unmute("network")
|
|
64
|
+
flux.flux("network", "Restored connection")
|
fluxdeck-0.2.0/README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# FluxDeck
|
|
2
|
+
|
|
3
|
+
FluxDeck is a lightweight Python utility for dynamically managing and rendering structured console output without clutter. It acts as a simple in-terminal state dashboard that continuously updates displayed information in real time.
|
|
4
|
+
|
|
5
|
+
It is built using Python threading and Rich’s live rendering system.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Features
|
|
10
|
+
|
|
11
|
+
- Dynamic category-based message tracking
|
|
12
|
+
- Live console updates without manual clearing
|
|
13
|
+
- Muting and unmuting of output categories
|
|
14
|
+
- Threaded rendering loop for continuous display updates
|
|
15
|
+
- Lightweight design with minimal dependencies
|
|
16
|
+
|
|
17
|
+
---
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
### Requirements
|
|
21
|
+
- Python 3.8+
|
|
22
|
+
- rich
|
|
23
|
+
|
|
24
|
+
Install dependency:
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
## Example Usage
|
|
29
|
+
|
|
30
|
+
This example demonstrates how FluxDeck updates and controls dynamic console output.
|
|
31
|
+
|
|
32
|
+
```python id="r2"
|
|
33
|
+
from fluxdeck import FluxDeck
|
|
34
|
+
import time
|
|
35
|
+
|
|
36
|
+
flux = FluxDeck()
|
|
37
|
+
|
|
38
|
+
# Initial system state
|
|
39
|
+
flux.flux("status", "Initializing system")
|
|
40
|
+
flux.flux("network", "Connected")
|
|
41
|
+
|
|
42
|
+
time.sleep(2)
|
|
43
|
+
|
|
44
|
+
# Update state dynamically
|
|
45
|
+
flux.flux("status", "Running")
|
|
46
|
+
flux.mute("network")
|
|
47
|
+
|
|
48
|
+
time.sleep(2)
|
|
49
|
+
|
|
50
|
+
# Restore and update a muted category
|
|
51
|
+
flux.unmute("network")
|
|
52
|
+
flux.flux("network", "Restored connection")
|
|
File without changes
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
|
|
2
|
+
__version__ = "0.2.0"
|
|
3
|
+
|
|
4
|
+
from rich.console import Console
|
|
5
|
+
from rich.live import Live
|
|
6
|
+
import asyncio
|
|
7
|
+
import time
|
|
8
|
+
import threading
|
|
9
|
+
|
|
10
|
+
class FluxDeck():
|
|
11
|
+
"""Dynamically print values to avoid clutter of console"""
|
|
12
|
+
def __init__(self):
|
|
13
|
+
self.status_messages = {}
|
|
14
|
+
self.muted_categories = []
|
|
15
|
+
self.console = Console()
|
|
16
|
+
self.display = None
|
|
17
|
+
self.lock = threading.Lock()
|
|
18
|
+
flux_thread=threading.Thread(target=self.flux_core)
|
|
19
|
+
flux_thread.start()
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def flux(self, category, info):
|
|
23
|
+
"""Update the content being displayed"""
|
|
24
|
+
with self.lock:
|
|
25
|
+
self.status_messages[category] = info
|
|
26
|
+
self.format_output()
|
|
27
|
+
|
|
28
|
+
def format_output(self):
|
|
29
|
+
"""Format the content to be displayed"""
|
|
30
|
+
lines=[]
|
|
31
|
+
for key,val in self.status_messages.items():
|
|
32
|
+
if key in self.muted_categories:
|
|
33
|
+
continue
|
|
34
|
+
lines.append(f"======={key}=========\n\t\t{val}\n")
|
|
35
|
+
|
|
36
|
+
self.display = "\n".join(lines)
|
|
37
|
+
|
|
38
|
+
def mute(self, category):
|
|
39
|
+
"""Category added here will not appear in displayed data"""
|
|
40
|
+
with self.lock:
|
|
41
|
+
self.muted_categories.append(category)
|
|
42
|
+
self.format_output()
|
|
43
|
+
|
|
44
|
+
def unmute(self, category):
|
|
45
|
+
"""Remove category from muted list"""
|
|
46
|
+
with self.lock:
|
|
47
|
+
if category not in self.muted_categories:
|
|
48
|
+
self.status_messages["error"] = f"'{category}' not in muted categories"
|
|
49
|
+
self.format_output()
|
|
50
|
+
else:
|
|
51
|
+
self.muted_categories.remove(category)
|
|
52
|
+
self.format_output()
|
|
53
|
+
|
|
54
|
+
def flux_core(self):
|
|
55
|
+
"""update console"""
|
|
56
|
+
with Live(console=self.console,refresh_per_second= 4) as live:
|
|
57
|
+
while True:
|
|
58
|
+
with self.lock:
|
|
59
|
+
display = self.display
|
|
60
|
+
live.update(display)
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
|
|
65
|
+
if __name__ == "__main__":
|
|
66
|
+
flux = FluxDeck()
|
|
67
|
+
flux.flux("connect","success")
|
|
68
|
+
flux.flux("authorize","failed")
|
|
69
|
+
flux.unmute("heyoo")
|
|
70
|
+
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: fluxdeck
|
|
3
|
+
Version: 0.2.0
|
|
4
|
+
Summary: Dynamic terminal state renderer using Rich
|
|
5
|
+
Author-email: Gideon Wamalwa <bond8865@gmail.com>
|
|
6
|
+
License: MIT
|
|
7
|
+
Requires-Python: >=3.8
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Requires-Dist: rich
|
|
11
|
+
Dynamic: license-file
|
|
12
|
+
|
|
13
|
+
# FluxDeck
|
|
14
|
+
|
|
15
|
+
FluxDeck is a lightweight Python utility for dynamically managing and rendering structured console output without clutter. It acts as a simple in-terminal state dashboard that continuously updates displayed information in real time.
|
|
16
|
+
|
|
17
|
+
It is built using Python threading and Rich’s live rendering system.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## Features
|
|
22
|
+
|
|
23
|
+
- Dynamic category-based message tracking
|
|
24
|
+
- Live console updates without manual clearing
|
|
25
|
+
- Muting and unmuting of output categories
|
|
26
|
+
- Threaded rendering loop for continuous display updates
|
|
27
|
+
- Lightweight design with minimal dependencies
|
|
28
|
+
|
|
29
|
+
---
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
### Requirements
|
|
33
|
+
- Python 3.8+
|
|
34
|
+
- rich
|
|
35
|
+
|
|
36
|
+
Install dependency:
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## Example Usage
|
|
41
|
+
|
|
42
|
+
This example demonstrates how FluxDeck updates and controls dynamic console output.
|
|
43
|
+
|
|
44
|
+
```python id="r2"
|
|
45
|
+
from fluxdeck import FluxDeck
|
|
46
|
+
import time
|
|
47
|
+
|
|
48
|
+
flux = FluxDeck()
|
|
49
|
+
|
|
50
|
+
# Initial system state
|
|
51
|
+
flux.flux("status", "Initializing system")
|
|
52
|
+
flux.flux("network", "Connected")
|
|
53
|
+
|
|
54
|
+
time.sleep(2)
|
|
55
|
+
|
|
56
|
+
# Update state dynamically
|
|
57
|
+
flux.flux("status", "Running")
|
|
58
|
+
flux.mute("network")
|
|
59
|
+
|
|
60
|
+
time.sleep(2)
|
|
61
|
+
|
|
62
|
+
# Restore and update a muted category
|
|
63
|
+
flux.unmute("network")
|
|
64
|
+
flux.flux("network", "Restored connection")
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rich
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["setuptools>=68", "wheel"]
|
|
3
|
+
build-backend = "setuptools.build_meta"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "fluxdeck"
|
|
7
|
+
version = "0.2.0"
|
|
8
|
+
description = "Dynamic terminal state renderer using Rich"
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
dependencies = [
|
|
12
|
+
"rich"
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
authors = [
|
|
16
|
+
{ name = "Gideon Wamalwa" ,email="bond8865@gmail.com"}
|
|
17
|
+
]
|
|
18
|
+
|
|
19
|
+
license = { text = "MIT" }
|
|
20
|
+
|
|
21
|
+
[tool.setuptools.packages.find]
|
|
22
|
+
where = ["."]
|
fluxdeck-0.2.0/setup.cfg
ADDED