k8s-helper-cli 0.1.2__tar.gz → 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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k8s-helper-cli
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: A simplified Python wrapper for common Kubernetes operations
5
5
  Author-email: Harshit Chatterjee <harshitchatterjee50@gmail.com>
6
6
  License-Expression: MIT
@@ -523,6 +523,9 @@ k8s-helper provides a command-line interface for Kubernetes operations. After in
523
523
  # Show help
524
524
  k8s-helper --help
525
525
 
526
+ # Show version
527
+ k8s-helper --version
528
+
526
529
  # Configure settings
527
530
  k8s-helper config --namespace my-namespace
528
531
  k8s-helper config --output-format yaml
@@ -498,6 +498,9 @@ k8s-helper provides a command-line interface for Kubernetes operations. After in
498
498
  # Show help
499
499
  k8s-helper --help
500
500
 
501
+ # Show version
502
+ k8s-helper --version
503
+
501
504
  # Configure settings
502
505
  k8s-helper config --namespace my-namespace
503
506
  k8s-helper config --output-format yaml
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "k8s-helper-cli"
3
- version = "0.1.2"
3
+ version = "0.2.0"
4
4
  description = "A simplified Python wrapper for common Kubernetes operations"
5
5
  readme = "README.md"
6
6
  authors = [
@@ -20,7 +20,7 @@ from .utils import (
20
20
  create_service_manifest
21
21
  )
22
22
 
23
- __version__ = "0.1.0"
23
+ __version__ = "0.2.0"
24
24
  __author__ = "Harshit Chatterjee"
25
25
  __email__ = "harshitchatterjee50@gmail.com"
26
26
 
@@ -23,10 +23,24 @@ from .utils import (
23
23
  parse_env_vars,
24
24
  parse_labels
25
25
  )
26
+ from . import __version__
27
+
28
+ def version_callback(value: bool):
29
+ """Version callback for the CLI"""
30
+ if value:
31
+ typer.echo(f"k8s-helper-cli version {__version__}")
32
+ raise typer.Exit()
26
33
 
27
34
  app = typer.Typer(help="k8s-helper: Simplified Kubernetes operations")
28
35
  console = Console()
29
36
 
37
+ @app.callback()
38
+ def main(
39
+ version: Optional[bool] = typer.Option(None, "--version", callback=version_callback, is_eager=True, help="Show version and exit")
40
+ ):
41
+ """Main callback to handle global options"""
42
+ return
43
+
30
44
  # Global options
31
45
  namespace_option = typer.Option(None, "--namespace", "-n", help="Kubernetes namespace")
32
46
  output_option = typer.Option("table", "--output", "-o", help="Output format: table, yaml, json")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: k8s-helper-cli
3
- Version: 0.1.2
3
+ Version: 0.2.0
4
4
  Summary: A simplified Python wrapper for common Kubernetes operations
5
5
  Author-email: Harshit Chatterjee <harshitchatterjee50@gmail.com>
6
6
  License-Expression: MIT
@@ -523,6 +523,9 @@ k8s-helper provides a command-line interface for Kubernetes operations. After in
523
523
  # Show help
524
524
  k8s-helper --help
525
525
 
526
+ # Show version
527
+ k8s-helper --version
528
+
526
529
  # Configure settings
527
530
  k8s-helper config --namespace my-namespace
528
531
  k8s-helper config --output-format yaml
File without changes
File without changes