File tree Expand file tree Collapse file tree 1 file changed +31
-9
lines changed Expand file tree Collapse file tree 1 file changed +31
-9
lines changed Original file line number Diff line number Diff line change 8
8
9
9
## Quick Start
10
10
11
- Greet name:
11
+ Greet a name:
12
12
13
13
``` sh
14
14
pipx run python_cli_template --name world
@@ -19,16 +19,14 @@ pipx run python_cli_template --name world
19
19
- [ Python] ( https://www.python.org/ )
20
20
- [ pipx] ( https://pipx.pypa.io/ )
21
21
22
- ## Install
22
+ ## CLI
23
23
24
- [ Python ] ( https://pypi.org/project/python_cli_template/ ) :
24
+ Install the CLI :
25
25
26
26
``` sh
27
27
pipx install python_cli_template
28
28
```
29
29
30
- ## CLI
31
-
32
30
### ` --name `
33
31
34
32
** Optional** : Name to greet. Defaults to ` World ` .
@@ -39,21 +37,39 @@ python_cli_template --name Alex
39
37
40
38
### ` --version `
41
39
42
- Show program's version number and exit:
40
+ Show the program's version number and exit:
43
41
44
42
``` sh
45
43
python_cli_template --version # python_cli_template -v
46
44
```
47
45
48
- Show help message and exit:
46
+ Show the help message and exit:
49
47
50
48
``` sh
51
49
python_cli_template --help # python_cli_template -h
52
50
```
53
51
54
- ## Package
52
+ ## Script
53
+
54
+ Create a virtual environment:
55
+
56
+ ``` sh
57
+ python3 -m venv .venv
58
+ ```
59
+
60
+ Activate the virtual environment:
55
61
56
- Greet name:
62
+ ``` sh
63
+ source .venv/bin/activate
64
+ ```
65
+
66
+ Install the package:
67
+
68
+ ``` sh
69
+ pip install python_cli_template
70
+ ```
71
+
72
+ Greet a name:
57
73
58
74
``` py
59
75
# script.py
@@ -62,6 +78,12 @@ from python_cli_template import hello
62
78
print (hello(" Bob" ))
63
79
```
64
80
81
+ Run the script:
82
+
83
+ ``` sh
84
+ python script.py
85
+ ```
86
+
65
87
## License
66
88
67
89
[ MIT] ( https://github.com/remarkablemark/python_cli_template/blob/master/LICENSE )
You can’t perform that action at this time.
0 commit comments