click-extended 0.3.2__tar.gz → 1.0.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.
Files changed (33) hide show
  1. click_extended-1.0.0/PKG-INFO +331 -0
  2. click_extended-1.0.0/README.md +262 -0
  3. click_extended-1.0.0/click_extended/__init__.py +21 -0
  4. click_extended-1.0.0/click_extended/classes.py +25 -0
  5. click_extended-1.0.0/click_extended/errors.py +450 -0
  6. click_extended-1.0.0/click_extended/types.py +12 -0
  7. click_extended-1.0.0/click_extended.egg-info/PKG-INFO +331 -0
  8. {click_extended-0.3.2 → click_extended-1.0.0}/click_extended.egg-info/SOURCES.txt +2 -11
  9. {click_extended-0.3.2 → click_extended-1.0.0}/click_extended.egg-info/requires.txt +8 -0
  10. {click_extended-0.3.2 → click_extended-1.0.0}/pyproject.toml +22 -4
  11. click_extended-1.0.0/tests/test_lifecycle.py +185 -0
  12. click_extended-0.3.2/PKG-INFO +0 -257
  13. click_extended-0.3.2/README.md +0 -194
  14. click_extended-0.3.2/click_extended/__init__.py +0 -30
  15. click_extended-0.3.2/click_extended/errors.py +0 -334
  16. click_extended-0.3.2/click_extended/types.py +0 -32
  17. click_extended-0.3.2/click_extended.egg-info/PKG-INFO +0 -257
  18. click_extended-0.3.2/tests/test_argument.py +0 -915
  19. click_extended-0.3.2/tests/test_child_node.py +0 -919
  20. click_extended-0.3.2/tests/test_command.py +0 -701
  21. click_extended-0.3.2/tests/test_env.py +0 -887
  22. click_extended-0.3.2/tests/test_global_node.py +0 -749
  23. click_extended-0.3.2/tests/test_group.py +0 -912
  24. click_extended-0.3.2/tests/test_option.py +0 -904
  25. click_extended-0.3.2/tests/test_parent_node.py +0 -620
  26. click_extended-0.3.2/tests/test_root_node.py +0 -558
  27. click_extended-0.3.2/tests/test_tag.py +0 -599
  28. click_extended-0.3.2/tests/test_tree.py +0 -778
  29. {click_extended-0.3.2 → click_extended-1.0.0}/AUTHORS.md +0 -0
  30. {click_extended-0.3.2 → click_extended-1.0.0}/LICENSE +0 -0
  31. {click_extended-0.3.2 → click_extended-1.0.0}/click_extended.egg-info/dependency_links.txt +0 -0
  32. {click_extended-0.3.2 → click_extended-1.0.0}/click_extended.egg-info/top_level.txt +0 -0
  33. {click_extended-0.3.2 → click_extended-1.0.0}/setup.cfg +0 -0
@@ -0,0 +1,331 @@
1
+ Metadata-Version: 2.4
2
+ Name: click_extended
3
+ Version: 1.0.0
4
+ Summary: An extension to Click with additional features like automatic async support, aliasing and a modular decorator system.
5
+ Author-email: Marcus Fredriksson <marcus@marcusfredriksson.com>
6
+ License: MIT License
7
+
8
+ Copyright (c) 2025 Marcus Fredriksson
9
+
10
+ Permission is hereby granted, free of charge, to any person obtaining a copy
11
+ of this software and associated documentation files (the "Software"), to deal
12
+ in the Software without restriction, including without limitation the rights
13
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
14
+ copies of the Software, and to permit persons to whom the Software is
15
+ furnished to do so, subject to the following conditions:
16
+
17
+ The above copyright notice and this permission notice shall be included in all
18
+ copies or substantial portions of the Software.
19
+
20
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
21
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
22
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
23
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
24
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
25
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
26
+ SOFTWARE.
27
+
28
+ Project-URL: Homepage, https://github.com/marcusfrdk/click-extended
29
+ Project-URL: Repository, https://github.com/marcusfrdk/click-extended
30
+ Project-URL: Issues, https://github.com/marcusfrdk/click-extended/issues
31
+ Keywords: click,cli,command-line,alias,aliasing,command,group,decorator,terminal,console
32
+ Classifier: Intended Audience :: Developers
33
+ Classifier: License :: OSI Approved :: MIT License
34
+ Classifier: Operating System :: OS Independent
35
+ Classifier: Programming Language :: Python :: 3
36
+ Classifier: Programming Language :: Python :: 3.10
37
+ Classifier: Programming Language :: Python :: 3.11
38
+ Classifier: Programming Language :: Python :: 3.12
39
+ Classifier: Programming Language :: Python :: 3.13
40
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
41
+ Classifier: Topic :: System :: Shells
42
+ Classifier: Topic :: Utilities
43
+ Classifier: Typing :: Typed
44
+ Requires-Python: >=3.10
45
+ Description-Content-Type: text/markdown
46
+ License-File: LICENSE
47
+ License-File: AUTHORS.md
48
+ Requires-Dist: click>=8.3.0
49
+ Requires-Dist: python-dotenv>=1.2.1
50
+ Requires-Dist: pyyaml>=6.0.3
51
+ Requires-Dist: email-validator>=2.3.0
52
+ Requires-Dist: python-slugify>=8.0.4
53
+ Requires-Dist: tomli>=2.0.0; python_version < "3.11"
54
+ Provides-Extra: build
55
+ Requires-Dist: build; extra == "build"
56
+ Requires-Dist: twine; extra == "build"
57
+ Provides-Extra: dev
58
+ Requires-Dist: pytest>=8.4.2; extra == "dev"
59
+ Requires-Dist: pytest-cov>=7.0.0; extra == "dev"
60
+ Requires-Dist: pytest-asyncio>=1.2.0; extra == "dev"
61
+ Requires-Dist: mypy>=1.18.2; extra == "dev"
62
+ Requires-Dist: pylint>=3.0.0; extra == "dev"
63
+ Requires-Dist: isort>=5.12.0; extra == "dev"
64
+ Requires-Dist: black>=25.9.0; extra == "dev"
65
+ Requires-Dist: pre-commit>=4.3.0; extra == "dev"
66
+ Requires-Dist: types-PyYAML>=6.0.12.20250915; extra == "dev"
67
+ Requires-Dist: tomli>=2.0.0; extra == "dev"
68
+ Dynamic: license-file
69
+
70
+ ![Banner](./assets/click-extended-banner.png)
71
+
72
+ # Click Extended
73
+
74
+ ![top language](https://img.shields.io/github/languages/top/marcusfrdk/click-extended)
75
+ ![code size](https://img.shields.io/github/languages/code-size/marcusfrdk/click-extended)
76
+ ![last commit](https://img.shields.io/github/last-commit/marcusfrdk/click-extended)
77
+ ![tests](https://github.com/marcusfrdk/click-extended/actions/workflows/tests.yml/badge.svg)
78
+ ![release](https://github.com/marcusfrdk/click-extended/actions/workflows/release.yml/badge.svg)
79
+ ![issues](https://img.shields.io/github/issues/marcusfrdk/click-extended)
80
+ ![contributors](https://img.shields.io/github/contributors/marcusfrdk/click-extended)
81
+ ![pypi](https://img.shields.io/pypi/v/click-extended)
82
+ ![license](https://img.shields.io/github/license/marcusfrdk/click-extended)
83
+ ![downloads](https://static.pepy.tech/badge/click-extended)
84
+ ![monthly downloads](https://static.pepy.tech/badge/click-extended/month)
85
+
86
+ An extension of the [Click](https://github.com/pallets/click) library with additional features like aliasing, asynchronous support, an extended decorator API and more.
87
+
88
+ ## Features
89
+
90
+ - **Decorator API**: Extend the functionality your command line by adding custom data sources, data processing pipelines, and more.
91
+ - **Aliasing**: Use aliases for groups and commands to reduce boilerplate and code repetition.
92
+ - **Tags**: Use tags to group several data sources together to apply batch processing.
93
+ - **Async Support**: Native support for declaring functions and methods asynchronous.
94
+ - **Environment Variables**: Built-in support for loading and using environment variables as a data source.
95
+ - **Full Type Support**: Built with type-hinting from the ground up, meaning everything is fully typed.
96
+ - **Improved Errors**: Improved error output like tips, debugging, and more.
97
+ - **Short Flag Concatenation**: Automatically support concatenating short hand flags where `-r -f` is the same as `-rf`.
98
+
99
+ ## Installation
100
+
101
+ ```bash
102
+ pip install click-extended
103
+ ```
104
+
105
+ ## Requirements
106
+
107
+ - **Python**: 3.10 or higher
108
+
109
+ ## Quick Start
110
+
111
+ ### Basic Command
112
+
113
+ ```python
114
+ from click_extended import command, argument, option
115
+
116
+ @command(aliases="ping")
117
+ @argument("value")
118
+ @option("--count", "-c", default=1)
119
+ def my_function(value: str, count: int):
120
+ """This is the help message for my_function."""
121
+ if _ in range(count):
122
+ print(value)
123
+
124
+ if __name__ == "__main__":
125
+ my_function()
126
+ ```
127
+
128
+ ```bash
129
+ $ python cli.py "Hello world"
130
+ Hello world
131
+ ```
132
+
133
+ ```bash
134
+ $ python cli.py "Hello world" --count 3
135
+ Hello world
136
+ Hello world
137
+ Hello world
138
+ ```
139
+
140
+ ### Basic Command Line Interface
141
+
142
+ ```python
143
+ from click_extended import group, argument, option
144
+
145
+ @group()
146
+ def my_group():
147
+ """This is the help message for my_group."""
148
+ print("Running initialization code...")
149
+
150
+ @my_group.command(aliases=["ping", "repeat"])
151
+ @argument("value")
152
+ @option("--count", "-c", default=1)
153
+ def my_function(value: str, count: int):
154
+ """This is the help message for my_function."""
155
+ if _ in range(count):
156
+ print(value)
157
+
158
+ if __name__ == "__main__":
159
+ my_group()
160
+ ```
161
+
162
+ ```bash
163
+ $ python cli.py my_function "Hello world"
164
+ Running initialization code...
165
+ Hello world
166
+ ```
167
+
168
+ ```bash
169
+ $ python cli.py my_function "Hello world" --count 3
170
+ Running initialization code...
171
+ Hello world
172
+ Hello world
173
+ Hello world
174
+ ```
175
+
176
+ ### Using Environment Variables
177
+
178
+ ```python
179
+ from click_extended import group, command, env
180
+
181
+ @group()
182
+ def my_group():
183
+ """This is the help message for my_group."""
184
+
185
+ @my_group.command()
186
+ @env("API_KEY")
187
+ def my_function_1(api_key: str | None):
188
+ """This is the help message for my_function."""
189
+ print(f"The API key is: {api_key}")
190
+
191
+ @my_group.command()
192
+ @env("API_KEY", required=True)
193
+ def my_function_2(api_key: str):
194
+ """This is the help message for my_function."""
195
+ print(f"The API key is: {api_key}")
196
+
197
+ if __name__ == "__main__":
198
+ my_group()
199
+ ```
200
+
201
+ ```bash
202
+ $ python cli.py my_function_1
203
+ The API key is: None
204
+ ```
205
+
206
+ ```bash
207
+ $ API_KEY=api-key python cli.py my_function_1
208
+ The API key is: api-key
209
+ ```
210
+
211
+ ```bash
212
+ $ python cli.py my_function_2
213
+ ProcessError (my_function_2): Required environment variable 'API_KEY' is not set.
214
+ ```
215
+
216
+ ```bash
217
+ $ API_KEY=api-key python cli.py my_function_2
218
+ The API key is: api-key
219
+ ```
220
+
221
+ ### Load CSV Data
222
+
223
+ ```python
224
+ import pandas as pd
225
+ from click_extended import command, argument
226
+ from click_extended.decorators import to_path, load_csv
227
+
228
+ @command()
229
+ @argument("file", param="data")
230
+ @to_path(extensions=["csv"], exists=True)
231
+ @load_csv()
232
+ def my_command(data: dict[str, Any], *args: Any, **kwargs: Any) -> None:
233
+ df = pd.DataFrame(data)
234
+ print(df.head())
235
+ ```
236
+
237
+ _Note: `pandas` is not installed in this library and must be installed manually due to size._
238
+
239
+ ### Pre-Built Children
240
+
241
+ This library includes a vast number of pre-built children, everything from checking values to transforming values.
242
+
243
+ ```python
244
+ from click_extended import command, argument, option
245
+ from click_extended.decorators import to_snake_case, strip, is_email, minimum, dependencies
246
+
247
+ @command()
248
+ @dependencies("username", "email", "password")
249
+ @argument("username")
250
+ @to_snake_case()
251
+ @strip()
252
+ @option("email")
253
+ @is_email()
254
+ @option("password")
255
+ @minimum(8)
256
+ def create_account(username: str, email: str, password: str) -> None:
257
+ print("Username:", username)
258
+ print("Email:", email)
259
+ print("Password:", password)
260
+ ```
261
+
262
+ ### Custom Nodes
263
+
264
+ If the library does not include a decorator you need, you can easily create your own. Read more about creating your own [children](./docs/core/CHILD_NODE.md), [validators](./docs/core/VALIDATION_NODE.md), [child validators](./docs/core/CHILD_VALIDATION_NODE.md) or [parents](./docs/core/PARENT_NODE.md).
265
+
266
+ ```python
267
+ from typing import Any
268
+
269
+ from click_extended import group, argument, option
270
+ from click_extended.classes import ChildNode
271
+ from click_extended.types import Context, Decorator
272
+
273
+ class MyCustomChild(ChildNode):
274
+ def handle_string(
275
+ self,
276
+ value: str,
277
+ context: Context,
278
+ *args: Any,
279
+ **kwargs: Any,
280
+ ) -> str:
281
+ if value == "invalid":
282
+ raise ValueError("The value 'invalid' is not valid")
283
+
284
+ return value.upper()
285
+
286
+ def my_custom_child() -> Decorator:
287
+ """Checks if the value is invalid and converts it to uppercase."""
288
+ return MyCustomChild.as_decorator()
289
+
290
+
291
+ @group()
292
+ def my_group():
293
+ """This is the help message for my_group."""
294
+ print("Running initialization code...")
295
+
296
+ @my_group.command(aliases=["ping", "repeat"])
297
+ @argument("value")
298
+ @my_custom_child()
299
+ def my_function(value: str):
300
+ """This is the help message for my_function."""
301
+ print(f"The value '{value}' should be uppercase.")
302
+
303
+ if __name__ == "__main__":
304
+ my_group()
305
+ ```
306
+
307
+ ```bash
308
+ $ python cli.py my_function valid
309
+ The value 'VALID' should be uppercase.
310
+ ```
311
+
312
+ ```bash
313
+ $ python cli.py my_function invalid
314
+ ValueError (my_function): "The value 'invalid' is not valid"
315
+ ```
316
+
317
+ ## Documentation
318
+
319
+ The full documentation is [available here](./docs/README.md) and goes through the full library, from explaining design choices, how to use the library, and much more.
320
+
321
+ ## Contributing
322
+
323
+ Contributors are more than welcome to work on this project. Read the [contribution documentation](./CONTRIBUTING.md) to learn more.
324
+
325
+ ## License
326
+
327
+ This project is licensed under the MIT License, see the [license file](./LICENSE) for details.
328
+
329
+ ## Acknowledgements
330
+
331
+ This project is built on top of the [Click](https://github.com/pallets/click) library.
@@ -0,0 +1,262 @@
1
+ ![Banner](./assets/click-extended-banner.png)
2
+
3
+ # Click Extended
4
+
5
+ ![top language](https://img.shields.io/github/languages/top/marcusfrdk/click-extended)
6
+ ![code size](https://img.shields.io/github/languages/code-size/marcusfrdk/click-extended)
7
+ ![last commit](https://img.shields.io/github/last-commit/marcusfrdk/click-extended)
8
+ ![tests](https://github.com/marcusfrdk/click-extended/actions/workflows/tests.yml/badge.svg)
9
+ ![release](https://github.com/marcusfrdk/click-extended/actions/workflows/release.yml/badge.svg)
10
+ ![issues](https://img.shields.io/github/issues/marcusfrdk/click-extended)
11
+ ![contributors](https://img.shields.io/github/contributors/marcusfrdk/click-extended)
12
+ ![pypi](https://img.shields.io/pypi/v/click-extended)
13
+ ![license](https://img.shields.io/github/license/marcusfrdk/click-extended)
14
+ ![downloads](https://static.pepy.tech/badge/click-extended)
15
+ ![monthly downloads](https://static.pepy.tech/badge/click-extended/month)
16
+
17
+ An extension of the [Click](https://github.com/pallets/click) library with additional features like aliasing, asynchronous support, an extended decorator API and more.
18
+
19
+ ## Features
20
+
21
+ - **Decorator API**: Extend the functionality your command line by adding custom data sources, data processing pipelines, and more.
22
+ - **Aliasing**: Use aliases for groups and commands to reduce boilerplate and code repetition.
23
+ - **Tags**: Use tags to group several data sources together to apply batch processing.
24
+ - **Async Support**: Native support for declaring functions and methods asynchronous.
25
+ - **Environment Variables**: Built-in support for loading and using environment variables as a data source.
26
+ - **Full Type Support**: Built with type-hinting from the ground up, meaning everything is fully typed.
27
+ - **Improved Errors**: Improved error output like tips, debugging, and more.
28
+ - **Short Flag Concatenation**: Automatically support concatenating short hand flags where `-r -f` is the same as `-rf`.
29
+
30
+ ## Installation
31
+
32
+ ```bash
33
+ pip install click-extended
34
+ ```
35
+
36
+ ## Requirements
37
+
38
+ - **Python**: 3.10 or higher
39
+
40
+ ## Quick Start
41
+
42
+ ### Basic Command
43
+
44
+ ```python
45
+ from click_extended import command, argument, option
46
+
47
+ @command(aliases="ping")
48
+ @argument("value")
49
+ @option("--count", "-c", default=1)
50
+ def my_function(value: str, count: int):
51
+ """This is the help message for my_function."""
52
+ if _ in range(count):
53
+ print(value)
54
+
55
+ if __name__ == "__main__":
56
+ my_function()
57
+ ```
58
+
59
+ ```bash
60
+ $ python cli.py "Hello world"
61
+ Hello world
62
+ ```
63
+
64
+ ```bash
65
+ $ python cli.py "Hello world" --count 3
66
+ Hello world
67
+ Hello world
68
+ Hello world
69
+ ```
70
+
71
+ ### Basic Command Line Interface
72
+
73
+ ```python
74
+ from click_extended import group, argument, option
75
+
76
+ @group()
77
+ def my_group():
78
+ """This is the help message for my_group."""
79
+ print("Running initialization code...")
80
+
81
+ @my_group.command(aliases=["ping", "repeat"])
82
+ @argument("value")
83
+ @option("--count", "-c", default=1)
84
+ def my_function(value: str, count: int):
85
+ """This is the help message for my_function."""
86
+ if _ in range(count):
87
+ print(value)
88
+
89
+ if __name__ == "__main__":
90
+ my_group()
91
+ ```
92
+
93
+ ```bash
94
+ $ python cli.py my_function "Hello world"
95
+ Running initialization code...
96
+ Hello world
97
+ ```
98
+
99
+ ```bash
100
+ $ python cli.py my_function "Hello world" --count 3
101
+ Running initialization code...
102
+ Hello world
103
+ Hello world
104
+ Hello world
105
+ ```
106
+
107
+ ### Using Environment Variables
108
+
109
+ ```python
110
+ from click_extended import group, command, env
111
+
112
+ @group()
113
+ def my_group():
114
+ """This is the help message for my_group."""
115
+
116
+ @my_group.command()
117
+ @env("API_KEY")
118
+ def my_function_1(api_key: str | None):
119
+ """This is the help message for my_function."""
120
+ print(f"The API key is: {api_key}")
121
+
122
+ @my_group.command()
123
+ @env("API_KEY", required=True)
124
+ def my_function_2(api_key: str):
125
+ """This is the help message for my_function."""
126
+ print(f"The API key is: {api_key}")
127
+
128
+ if __name__ == "__main__":
129
+ my_group()
130
+ ```
131
+
132
+ ```bash
133
+ $ python cli.py my_function_1
134
+ The API key is: None
135
+ ```
136
+
137
+ ```bash
138
+ $ API_KEY=api-key python cli.py my_function_1
139
+ The API key is: api-key
140
+ ```
141
+
142
+ ```bash
143
+ $ python cli.py my_function_2
144
+ ProcessError (my_function_2): Required environment variable 'API_KEY' is not set.
145
+ ```
146
+
147
+ ```bash
148
+ $ API_KEY=api-key python cli.py my_function_2
149
+ The API key is: api-key
150
+ ```
151
+
152
+ ### Load CSV Data
153
+
154
+ ```python
155
+ import pandas as pd
156
+ from click_extended import command, argument
157
+ from click_extended.decorators import to_path, load_csv
158
+
159
+ @command()
160
+ @argument("file", param="data")
161
+ @to_path(extensions=["csv"], exists=True)
162
+ @load_csv()
163
+ def my_command(data: dict[str, Any], *args: Any, **kwargs: Any) -> None:
164
+ df = pd.DataFrame(data)
165
+ print(df.head())
166
+ ```
167
+
168
+ _Note: `pandas` is not installed in this library and must be installed manually due to size._
169
+
170
+ ### Pre-Built Children
171
+
172
+ This library includes a vast number of pre-built children, everything from checking values to transforming values.
173
+
174
+ ```python
175
+ from click_extended import command, argument, option
176
+ from click_extended.decorators import to_snake_case, strip, is_email, minimum, dependencies
177
+
178
+ @command()
179
+ @dependencies("username", "email", "password")
180
+ @argument("username")
181
+ @to_snake_case()
182
+ @strip()
183
+ @option("email")
184
+ @is_email()
185
+ @option("password")
186
+ @minimum(8)
187
+ def create_account(username: str, email: str, password: str) -> None:
188
+ print("Username:", username)
189
+ print("Email:", email)
190
+ print("Password:", password)
191
+ ```
192
+
193
+ ### Custom Nodes
194
+
195
+ If the library does not include a decorator you need, you can easily create your own. Read more about creating your own [children](./docs/core/CHILD_NODE.md), [validators](./docs/core/VALIDATION_NODE.md), [child validators](./docs/core/CHILD_VALIDATION_NODE.md) or [parents](./docs/core/PARENT_NODE.md).
196
+
197
+ ```python
198
+ from typing import Any
199
+
200
+ from click_extended import group, argument, option
201
+ from click_extended.classes import ChildNode
202
+ from click_extended.types import Context, Decorator
203
+
204
+ class MyCustomChild(ChildNode):
205
+ def handle_string(
206
+ self,
207
+ value: str,
208
+ context: Context,
209
+ *args: Any,
210
+ **kwargs: Any,
211
+ ) -> str:
212
+ if value == "invalid":
213
+ raise ValueError("The value 'invalid' is not valid")
214
+
215
+ return value.upper()
216
+
217
+ def my_custom_child() -> Decorator:
218
+ """Checks if the value is invalid and converts it to uppercase."""
219
+ return MyCustomChild.as_decorator()
220
+
221
+
222
+ @group()
223
+ def my_group():
224
+ """This is the help message for my_group."""
225
+ print("Running initialization code...")
226
+
227
+ @my_group.command(aliases=["ping", "repeat"])
228
+ @argument("value")
229
+ @my_custom_child()
230
+ def my_function(value: str):
231
+ """This is the help message for my_function."""
232
+ print(f"The value '{value}' should be uppercase.")
233
+
234
+ if __name__ == "__main__":
235
+ my_group()
236
+ ```
237
+
238
+ ```bash
239
+ $ python cli.py my_function valid
240
+ The value 'VALID' should be uppercase.
241
+ ```
242
+
243
+ ```bash
244
+ $ python cli.py my_function invalid
245
+ ValueError (my_function): "The value 'invalid' is not valid"
246
+ ```
247
+
248
+ ## Documentation
249
+
250
+ The full documentation is [available here](./docs/README.md) and goes through the full library, from explaining design choices, how to use the library, and much more.
251
+
252
+ ## Contributing
253
+
254
+ Contributors are more than welcome to work on this project. Read the [contribution documentation](./CONTRIBUTING.md) to learn more.
255
+
256
+ ## License
257
+
258
+ This project is licensed under the MIT License, see the [license file](./LICENSE) for details.
259
+
260
+ ## Acknowledgements
261
+
262
+ This project is built on top of the [Click](https://github.com/pallets/click) library.
@@ -0,0 +1,21 @@
1
+ """Initialization file for the 'click_extended' module."""
2
+
3
+ from click_extended.core.decorators.argument import argument
4
+ from click_extended.core.decorators.command import command
5
+ from click_extended.core.decorators.env import env
6
+ from click_extended.core.decorators.group import group
7
+ from click_extended.core.decorators.option import option
8
+ from click_extended.core.decorators.prompt import prompt
9
+ from click_extended.core.decorators.selection import selection
10
+ from click_extended.core.decorators.tag import tag
11
+
12
+ __all__ = [
13
+ "argument",
14
+ "command",
15
+ "env",
16
+ "group",
17
+ "option",
18
+ "prompt",
19
+ "selection",
20
+ "tag",
21
+ ]
@@ -0,0 +1,25 @@
1
+ """Classes used in `click_extended`."""
2
+
3
+ from click_extended.core.decorators.command import Command
4
+ from click_extended.core.decorators.group import Group
5
+ from click_extended.core.decorators.tag import Tag
6
+ from click_extended.core.nodes.argument_node import ArgumentNode
7
+ from click_extended.core.nodes.child_node import ChildNode
8
+ from click_extended.core.nodes.child_validation_node import ChildValidationNode
9
+ from click_extended.core.nodes.node import Node
10
+ from click_extended.core.nodes.option_node import OptionNode
11
+ from click_extended.core.nodes.parent_node import ParentNode
12
+ from click_extended.core.nodes.validation_node import ValidationNode
13
+
14
+ __all__ = [
15
+ "Node",
16
+ "ChildNode",
17
+ "ChildValidationNode",
18
+ "ParentNode",
19
+ "ArgumentNode",
20
+ "OptionNode",
21
+ "Command",
22
+ "Group",
23
+ "Tag",
24
+ "ValidationNode",
25
+ ]