-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9a40a56
commit 6ee7e70
Showing
21 changed files
with
239 additions
and
240 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
# Changelog | ||
|
||
# 0.0.0 (YYYY-MM-DD) | ||
|
||
- TBD |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
# API | ||
A command/sub-command is parsed from function. | ||
|
||
## Function | ||
Function's signature is used to create parser | ||
|
||
### 1. Positional Arguments: | ||
Positional arguments become mandatory. | ||
|
||
### 2. Keyword Arguments: | ||
All keyword arguments in the function definition are options. | ||
Arbitrary args and values can be captured with **kwargs | ||
|
||
### 3. type annotations: | ||
used to determine the type and action of the arguments | ||
list, tuple, Enum are supported, List[Enum] are supported | ||
|
||
### 4. Docstring (ReST or GoogleDoc) | ||
- The top part of the docstring becomes the usage message for the app. | ||
- ReST or GoogleDoc-style :param: lines in the following format describe the option | ||
- Options-strings can further be defined in the docstring. | ||
```pydocstring | ||
Args: | ||
name: [short option and/or long option] help text | ||
variable_name: -v --verbose the help_text for the variable | ||
variable_name: -v the help_text no long option | ||
variable_name: --verbose the help_text no short option | ||
``` | ||
|
||
::: arger.parser.classes.Option | ||
::: arger.parser.classes.Argument | ||
::: arger.Arger | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.