fastcommand 0.1.6__tar.gz → 0.1.8__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: fastcommand
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Author-email: Jason Morley <hello@jbmorley.co.uk>
5
5
  License: MIT License
6
6
 
@@ -29,6 +29,8 @@ License-File: LICENSE
29
29
 
30
30
  # fastcommand
31
31
 
32
+ [![build](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml/badge.svg)](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml)
33
+
32
34
  Python module for defining multi-command cli programs
33
35
 
34
36
  ## Description
@@ -46,6 +48,16 @@ def command_hello(options):
46
48
  print("Hello, World!")
47
49
 
48
50
 
51
+ @fastcommand.command("goodbye", help="say goodbye", arguments=[
52
+ fastcommand.Argument("name"),
53
+ fastcommand.Argument("--wave", "-w", action="store_true", default=False)
54
+ ])
55
+ def command_goodbye(options):
56
+ print(f"Goodbye, {options.name}!")
57
+ if options.wave:
58
+ print("👋")
59
+
60
+
49
61
  def main():
50
62
  cli = fastcommand.CommandParser(description="Simple fastcommand example.")
51
63
  cli.use_logging(format="[%(levelname)s] %(message)s")
@@ -1,5 +1,7 @@
1
1
  # fastcommand
2
2
 
3
+ [![build](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml/badge.svg)](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml)
4
+
3
5
  Python module for defining multi-command cli programs
4
6
 
5
7
  ## Description
@@ -17,6 +19,16 @@ def command_hello(options):
17
19
  print("Hello, World!")
18
20
 
19
21
 
22
+ @fastcommand.command("goodbye", help="say goodbye", arguments=[
23
+ fastcommand.Argument("name"),
24
+ fastcommand.Argument("--wave", "-w", action="store_true", default=False)
25
+ ])
26
+ def command_goodbye(options):
27
+ print(f"Goodbye, {options.name}!")
28
+ if options.wave:
29
+ print("👋")
30
+
31
+
20
32
  def main():
21
33
  cli = fastcommand.CommandParser(description="Simple fastcommand example.")
22
34
  cli.use_logging(format="[%(levelname)s] %(message)s")
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: fastcommand
3
- Version: 0.1.6
3
+ Version: 0.1.8
4
4
  Author-email: Jason Morley <hello@jbmorley.co.uk>
5
5
  License: MIT License
6
6
 
@@ -29,6 +29,8 @@ License-File: LICENSE
29
29
 
30
30
  # fastcommand
31
31
 
32
+ [![build](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml/badge.svg)](https://github.com/jbmorley/fastcommand/actions/workflows/build.yaml)
33
+
32
34
  Python module for defining multi-command cli programs
33
35
 
34
36
  ## Description
@@ -46,6 +48,16 @@ def command_hello(options):
46
48
  print("Hello, World!")
47
49
 
48
50
 
51
+ @fastcommand.command("goodbye", help="say goodbye", arguments=[
52
+ fastcommand.Argument("name"),
53
+ fastcommand.Argument("--wave", "-w", action="store_true", default=False)
54
+ ])
55
+ def command_goodbye(options):
56
+ print(f"Goodbye, {options.name}!")
57
+ if options.wave:
58
+ print("👋")
59
+
60
+
49
61
  def main():
50
62
  cli = fastcommand.CommandParser(description="Simple fastcommand example.")
51
63
  cli.use_logging(format="[%(levelname)s] %(message)s")
File without changes
File without changes
File without changes
File without changes