kaskade 2.2.0__tar.gz → 2.3.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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: kaskade
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: kaskade is a terminal user interface for kafka
5
5
  Home-page: https://github.com/sauljabin/kaskade
6
6
  License: MIT
@@ -23,16 +23,21 @@ Project-URL: Documentation, https://github.com/sauljabin/kaskade
23
23
  Project-URL: Repository, https://github.com/sauljabin/kaskade
24
24
  Description-Content-Type: text/markdown
25
25
 
26
- <p align="center"><a href="https://github.com/sauljabin/kaskade"><img alt="kaskade" width="400" src="https://raw.githubusercontent.com/sauljabin/kaskade/main/screenshots/banner.png"></a></p>
26
+ <p align="center">
27
+ <a href="https://github.com/sauljabin/kaskade"><img alt="kaskade" width="400" src="https://raw.githubusercontent.com/sauljabin/kaskade/main/screenshots/banner.png"></a>
28
+ </p>
27
29
 
30
+ <p align="center">
28
31
  <a href="https://github.com/sauljabin/kaskade"><img alt="GitHub" src="https://img.shields.io/badge/github-blueviolet?logo=github&logoColor=white"></a>
29
- <a href="https://hub.docker.com/r/sauljabin/kaskade"><img alt="DockerHub" src="https://img.shields.io/badge/docker-blue?logo=docker&logoColor=white"></a>
30
32
  <a href="https://github.com/sponsors/sauljabin"><img alt="donate" src="https://img.shields.io/badge/donate-EA4AAA?logo=github-sponsors&logoColor=white"></a>
31
- <a href="https://libraries.io/pypi/kaskade"><img alt="Libraries.io dependency status for latest release" src="https://img.shields.io/librariesio/release/pypi/kaskade?label="></a>
33
+ <a href="https://libraries.io/pypi/kaskade"><img alt="Libraries.io dependency status for latest release" src="https://img.shields.io/librariesio/release/pypi/kaskade?logo=python&logoColor=white&label="></a>
32
34
  <a href="https://github.com/sauljabin/kaskade/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/github/license/sauljabin/kaskade"></a>
33
- <a href="https://pypi.org/project/kaskade"><img alt="Version" src="https://img.shields.io/pypi/v/kaskade?label=latest"></a>
34
- <a href="https://pypi.org/project/kaskade"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/kaskade?label=python"></a>
35
+ <a href="https://pypi.org/project/kaskade"><img alt="Pypi Version" src="https://img.shields.io/pypi/v/kaskade"></a>
36
+ <a href="https://formulae.brew.sh/formula/kaskade"><img alt="Homebrew Version" src="https://img.shields.io/homebrew/v/kaskade"></a>
37
+ <a href="https://hub.docker.com/r/sauljabin/kaskade/tags"><img alt="Docker Version" src="https://img.shields.io/docker/v/sauljabin/kaskade?label=dockerhub"></a>
35
38
  <a href="https://pypi.org/project/kaskade"><img alt="Platform" src="https://img.shields.io/badge/os-linux%20%7C%20macos-blue"></a>
39
+ <a href="https://pypi.org/project/kaskade"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/kaskade?label=python"></a>
40
+ </p>
36
41
 
37
42
  ## Kaskade
38
43
 
@@ -73,8 +78,6 @@ by [Textualize](https://www.textualize.io/). It includes features like:
73
78
 
74
79
  ## Installation
75
80
 
76
- These will install `kaskade` and `kskd` aliases.
77
-
78
81
  #### Install it with `brew`:
79
82
 
80
83
  ```bash
@@ -195,7 +198,7 @@ Generate a _Descriptor Set_ file from your `.proto` file:
195
198
 
196
199
  ```bash
197
200
  protoc --include_imports \
198
- --descriptor_set_out=./my-descriptor.desc \
201
+ --descriptor_set_out=my-descriptor.desc \
199
202
  --proto_path=${PROTO_PATH} \
200
203
  ${PROTO_PATH}/my-proto.proto
201
204
  ```
@@ -1,13 +1,18 @@
1
- <p align="center"><a href="https://github.com/sauljabin/kaskade"><img alt="kaskade" width="400" src="https://raw.githubusercontent.com/sauljabin/kaskade/main/screenshots/banner.png"></a></p>
1
+ <p align="center">
2
+ <a href="https://github.com/sauljabin/kaskade"><img alt="kaskade" width="400" src="https://raw.githubusercontent.com/sauljabin/kaskade/main/screenshots/banner.png"></a>
3
+ </p>
2
4
 
5
+ <p align="center">
3
6
  <a href="https://github.com/sauljabin/kaskade"><img alt="GitHub" src="https://img.shields.io/badge/github-blueviolet?logo=github&logoColor=white"></a>
4
- <a href="https://hub.docker.com/r/sauljabin/kaskade"><img alt="DockerHub" src="https://img.shields.io/badge/docker-blue?logo=docker&logoColor=white"></a>
5
7
  <a href="https://github.com/sponsors/sauljabin"><img alt="donate" src="https://img.shields.io/badge/donate-EA4AAA?logo=github-sponsors&logoColor=white"></a>
6
- <a href="https://libraries.io/pypi/kaskade"><img alt="Libraries.io dependency status for latest release" src="https://img.shields.io/librariesio/release/pypi/kaskade?label="></a>
8
+ <a href="https://libraries.io/pypi/kaskade"><img alt="Libraries.io dependency status for latest release" src="https://img.shields.io/librariesio/release/pypi/kaskade?logo=python&logoColor=white&label="></a>
7
9
  <a href="https://github.com/sauljabin/kaskade/blob/main/LICENSE"><img alt="MIT License" src="https://img.shields.io/github/license/sauljabin/kaskade"></a>
8
- <a href="https://pypi.org/project/kaskade"><img alt="Version" src="https://img.shields.io/pypi/v/kaskade?label=latest"></a>
9
- <a href="https://pypi.org/project/kaskade"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/kaskade?label=python"></a>
10
+ <a href="https://pypi.org/project/kaskade"><img alt="Pypi Version" src="https://img.shields.io/pypi/v/kaskade"></a>
11
+ <a href="https://formulae.brew.sh/formula/kaskade"><img alt="Homebrew Version" src="https://img.shields.io/homebrew/v/kaskade"></a>
12
+ <a href="https://hub.docker.com/r/sauljabin/kaskade/tags"><img alt="Docker Version" src="https://img.shields.io/docker/v/sauljabin/kaskade?label=dockerhub"></a>
10
13
  <a href="https://pypi.org/project/kaskade"><img alt="Platform" src="https://img.shields.io/badge/os-linux%20%7C%20macos-blue"></a>
14
+ <a href="https://pypi.org/project/kaskade"><img alt="Python Versions" src="https://img.shields.io/pypi/pyversions/kaskade?label=python"></a>
15
+ </p>
11
16
 
12
17
  ## Kaskade
13
18
 
@@ -48,8 +53,6 @@ by [Textualize](https://www.textualize.io/). It includes features like:
48
53
 
49
54
  ## Installation
50
55
 
51
- These will install `kaskade` and `kskd` aliases.
52
-
53
56
  #### Install it with `brew`:
54
57
 
55
58
  ```bash
@@ -170,7 +173,7 @@ Generate a _Descriptor Set_ file from your `.proto` file:
170
173
 
171
174
  ```bash
172
175
  protoc --include_imports \
173
- --descriptor_set_out=./my-descriptor.desc \
176
+ --descriptor_set_out=my-descriptor.desc \
174
177
  --proto_path=${PROTO_PATH} \
175
178
  ${PROTO_PATH}/my-proto.proto
176
179
  ```
@@ -3,19 +3,12 @@ from importlib.metadata import version
3
3
  from pathlib import Path
4
4
 
5
5
  APP_NAME = "kaskade"
6
- APP_NAME_SHORT = "kskd"
7
6
  __version__ = APP_VERSION = version(APP_NAME)
8
7
  APP_BANNER = r""" _ _ _
9
8
  | | ____ _ ___| | ____ _ __| | ___
10
9
  | |/ / _` / __| |/ / _` |/ _` |/ _ \
11
10
  | < (_| \__ \ < (_| | (_| | __/
12
11
  |_|\_\__,_|___/_|\_\__,_|\__,_|\___|"""
13
- APP_BANNER_SHORT = r""" _ _ _
14
- | | _____| | ____| |
15
- | |/ / __| |/ / _` |
16
- | <\__ \ < (_| |
17
- |_|\_\___/_|\_\__,_|"""
18
-
19
12
 
20
13
  path_home = Path.home()
21
14
  kaskade_path = path_home.joinpath("." + APP_NAME)
@@ -40,17 +40,17 @@ REFRESH_TOPICS_SHORTCUT = "ctrl+r"
40
40
  QUIT_SHORTCUT = "ctrl+c"
41
41
 
42
42
 
43
- class Shortcuts(Widget):
43
+ class AdminShortcuts(Widget):
44
44
 
45
45
  SHORTCUTS = [
46
- ["all:", BACK_SHORTCUT, "describe:", SUBMIT_SHORTCUT],
46
+ ["all:", BACK_SHORTCUT, "show:", SUBMIT_SHORTCUT],
47
47
  ["refresh:", REFRESH_TOPICS_SHORTCUT, "create:", NEW_TOPIC_SHORTCUT],
48
48
  ["filter:", FILTER_TOPICS_SHORTCUT, "edit:", EDIT_TOPIC_SHORTCUT],
49
49
  ["quit:", QUIT_SHORTCUT, "delete:", DELETE_TOPIC_SHORTCUT],
50
50
  ]
51
51
 
52
52
  def render(self) -> RenderResult:
53
- table = Table(box=None, show_header=False, padding=(0, 1, 0, 0))
53
+ table = Table(box=None, show_header=False, padding=(0, 0, 0, 1))
54
54
  table.add_column(style=PRIMARY)
55
55
  table.add_column(style=SECONDARY)
56
56
  table.add_column(style=PRIMARY)
@@ -65,8 +65,8 @@ class Shortcuts(Widget):
65
65
  class Header(Widget):
66
66
 
67
67
  def compose(self) -> ComposeResult:
68
- yield KaskadeBanner(short=True, include_version=True, include_slogan=False)
69
- yield Shortcuts()
68
+ yield AdminShortcuts()
69
+ yield KaskadeBanner(include_version=True, include_slogan=False)
70
70
 
71
71
 
72
72
  class FilterTopicsScreen(ModalScreen[str]):
@@ -2,22 +2,19 @@ from rich.console import Group
2
2
  from rich.text import Text
3
3
  from textual.widget import Widget
4
4
 
5
- from kaskade import APP_BANNER_SHORT, APP_BANNER, APP_VERSION
5
+ from kaskade import APP_BANNER, APP_VERSION
6
6
  from kaskade.colors import PRIMARY, SECONDARY
7
7
 
8
8
 
9
9
  class KaskadeBanner(Widget):
10
- def __init__(
11
- self, *, include_version: bool = False, include_slogan: bool = False, short: bool = False
12
- ):
10
+ def __init__(self, *, include_version: bool = False, include_slogan: bool = False):
13
11
  super().__init__()
14
12
  self.include_slogan = include_slogan
15
13
  self.include_version = include_version
16
- self.short = short
17
14
 
18
15
  def render(self) -> Group:
19
16
  kaskade_name = Text(
20
- APP_BANNER_SHORT if self.short else APP_BANNER,
17
+ APP_BANNER,
21
18
  style=f"{PRIMARY} bold",
22
19
  )
23
20
  version_text = Text("", justify="right")
@@ -26,18 +26,23 @@ BACK_SHORTCUT = "escape"
26
26
  FILTER_SHORTCUT = "/"
27
27
 
28
28
 
29
- class Shortcuts(Widget):
29
+ class ConsumerShortcuts(Widget):
30
+
31
+ SHORTCUTS = [
32
+ ["all:", BACK_SHORTCUT, "show:", SUBMIT_SHORTCUT],
33
+ ["more:", NEXT_SHORTCUT, "filter:", FILTER_SHORTCUT],
34
+ ["quit:", QUIT_SHORTCUT, "chunk:", CHUNKS_SHORTCUT],
35
+ ]
30
36
 
31
37
  def render(self) -> RenderResult:
32
- table = Table(box=None, show_header=False, padding=(0, 1, 0, 0))
38
+ table = Table(box=None, show_header=False, padding=(0, 0, 0, 1))
39
+ table.add_column(style=PRIMARY)
40
+ table.add_column(style=SECONDARY)
33
41
  table.add_column(style=PRIMARY)
34
42
  table.add_column(style=SECONDARY)
35
43
 
36
- table.add_row("show:", SUBMIT_SHORTCUT)
37
- table.add_row("more:", NEXT_SHORTCUT)
38
- table.add_row("filter:", FILTER_SHORTCUT)
39
- table.add_row("chunk:", CHUNKS_SHORTCUT)
40
- table.add_row("quit:", QUIT_SHORTCUT)
44
+ for shortcuts in self.SHORTCUTS:
45
+ table.add_row(*shortcuts)
41
46
 
42
47
  return table
43
48
 
@@ -45,8 +50,8 @@ class Shortcuts(Widget):
45
50
  class Header(Widget):
46
51
 
47
52
  def compose(self) -> ComposeResult:
48
- yield KaskadeBanner(short=True, include_version=True, include_slogan=False)
49
- yield Shortcuts()
53
+ yield ConsumerShortcuts()
54
+ yield KaskadeBanner(include_version=True, include_slogan=False)
50
55
 
51
56
 
52
57
  class FilterRecordScreen(ModalScreen[tuple[str, str, str, str]]):
@@ -159,6 +164,7 @@ class ListRecords(Container):
159
164
  Binding(CHUNKS_SHORTCUT, "change_chunk"),
160
165
  Binding(FILTER_SHORTCUT, "filter"),
161
166
  Binding(SUBMIT_SHORTCUT, "show_message", priority=True),
167
+ Binding(BACK_SHORTCUT, "all"),
162
168
  ]
163
169
 
164
170
  def __init__(
@@ -234,6 +240,15 @@ class ListRecords(Container):
234
240
  def on_mount(self) -> None:
235
241
  self.run_worker(self.action_consume())
236
242
 
243
+ def action_all(self) -> None:
244
+ self.key_filter, self.value_filter, self.partition_filter, self.header_filter = (
245
+ "",
246
+ "",
247
+ "",
248
+ "",
249
+ )
250
+ self._filter()
251
+
237
252
  def action_filter(self) -> None:
238
253
  def dismiss(result: tuple[str, str, str, str] | None) -> None:
239
254
  if result is None:
@@ -126,12 +126,12 @@ class ProtobufDeserializer(Deserializer):
126
126
 
127
127
  if context == MessageField.KEY:
128
128
  if self.key_class is None:
129
- raise Exception("Protobuf class name not provided for context KEY")
129
+ raise Exception("Protobuf message name not provided for context KEY")
130
130
  deserialization_class = self.descriptor_classes.get(self.key_class)
131
131
 
132
132
  if context == MessageField.VALUE:
133
133
  if self.value_class is None:
134
- raise Exception("Protobuf class name not provided for context VALUE")
134
+ raise Exception("Protobuf message name not provided for context VALUE")
135
135
  deserialization_class = self.descriptor_classes.get(self.value_class)
136
136
 
137
137
  if deserialization_class is None:
@@ -139,7 +139,7 @@ def admin(
139
139
  "-p",
140
140
  "protobuf_config",
141
141
  help="Protobuf property. Configure the protobuf deserializer. Multiple '-p' are allowed. Needed if '-k protobuf' "
142
- "or '-v protobuf' were passed. Valid properties: [descriptor, key, value].",
142
+ "or '-v protobuf' were passed. Valid properties: [descriptor: file path, key: protobuf message, value: protobuf message].",
143
143
  metavar="property=value",
144
144
  multiple=True,
145
145
  callback=tuple_properties_to_dict,
@@ -9,13 +9,20 @@ Header {
9
9
  }
10
10
 
11
11
  KaskadeBanner {
12
+ width: 36;
13
+ margin: 0 0 0 1;
14
+ }
15
+
16
+ ConsumerShortcuts {
17
+ width: 27;
12
18
  dock: right;
13
- width: 20;
14
- margin: 0 1 0 0;
19
+ margin: 1 1 0 0;
15
20
  }
16
21
 
17
- Shortcuts {
18
- margin: 0 0 0 1;
22
+ AdminShortcuts {
23
+ width: 31;
24
+ dock: right;
25
+ margin: 1 1 0 0;
19
26
  }
20
27
 
21
28
  DataTable {
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "kaskade"
3
- version = "2.2.0"
3
+ version = "2.3.0"
4
4
  description = "kaskade is a terminal user interface for kafka"
5
5
  authors = ["Saúl Piña <sauljabin@gmail.com>"]
6
6
  license = "MIT"
@@ -51,4 +51,3 @@ line-length = 100
51
51
 
52
52
  [tool.poetry.scripts]
53
53
  kaskade = "kaskade.main:cli"
54
- kskd = "kaskade.main:cli"
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes