Skip to content

Commit 036d29f

Browse files
committed
Update why.md, bump version number
1 parent 8e0544e commit 036d29f

File tree

2 files changed

+22
-15
lines changed

2 files changed

+22
-15
lines changed

docs/why.md

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,20 @@
11
# Why `arguably`?
22

3-
With plenty of other tools out there, why use `arguably`? Aren't `click` and `typer` good enough?
3+
With plenty of other tools out there, why use `arguably`? Aren't other ones (`click`, `typer`, etc) good enough?
44

5-
The short answer is: yeah, probably! They're really great tools. But they still make you write quite a bit of code.
6-
That's where `arguably` comes in.
5+
The short answer is: yeah, probably! Python already has great tools for building CLIs. But they still make you write
6+
quite a bit of code. That's where `arguably` comes in.
77

88
## An unobtrusive API
99

10-
What `arguably` does best is get out of your way. Set up a function signature and docstring, annotate with
11-
`@arguably.command`, and you've set up a CLI. That's it, that's the API. No need for `typer.Option()` or
12-
`click.option()`. That's because `arguably` was built from the ground-up with a focus on providing most of the features
13-
of these libraries (and a few extra) with few code changes necessary on your part.
10+
What `arguably` does best is get out of your way.
1411

15-
Your decorated functions still look and behave like regular functions.
12+
Set up a *function signature* and *docstring*, annotate with `@arguably.command`, and you've set up a CLI. That's it,
13+
that's the API.
14+
15+
No need for `typer.Option()` or `click.option()`. That's because `arguably` was built from the ground-up with a focus on
16+
providing most of the features of these libraries (and a few extra) with few code changes necessary on your part.
17+
Because of this, your CLI functions still look and behave like regular functions.
1618

1719
<div align="right" class="code-source"><sub>
1820
<a href="https://github.com/treykeown/arguably/blob/main/etc/scripts/intro.py">[source]</a>
@@ -39,12 +41,6 @@ if __name__ == "__main__":
3941
arguably.run()
4042
```
4143

42-
```pycon
43-
>>> from intro import some_function
44-
>>> some_function("asdf", 0, 7, 8, 9, option=2.71)
45-
required='asdf', not_required=0, others=(7, 8, 9), option=2.71
46-
```
47-
4844
```console
4945
user@machine:~$ ./intro.py -h
5046
usage: intro.py [-h] [-x OPTION] required [not-required] [others ...]
@@ -61,6 +57,17 @@ options:
6157
-x, --option OPTION an option, short name is in brackets (type: float, default: 3.14)
6258
```
6359

60+
```pycon
61+
>>> from intro import some_function
62+
>>> some_function("asdf", 0, 7, 8, 9, option=2.71)
63+
required='asdf', not_required=0, others=(7, 8, 9), option=2.71
64+
```
65+
66+
```console
67+
user@machine:~$ ./intro.py "asdf" 0 7 8 9 --option 2.71
68+
required='asdf', not_required=0, others=(7, 8, 9), option=2.71
69+
```
70+
6471
## Zero-effort CLI
6572

6673
Taking inspiration from [Python Fire](https://google.github.io/python-fire/guide/#version-4-fire-without-code-changes),

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[tool.poetry]
22
name = "arguably"
3-
version = "1.2.2"
3+
version = "1.2.3"
44
description = "The best Python CLI library, arguably."
55
authors = ["treykeown <[email protected]>"]
66
readme = "etc/pypi/PYPI_README.md"

0 commit comments

Comments
 (0)