Skip to content

Commit

Permalink
updated v0.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
ozcanyarimdunya authored Feb 1, 2023
1 parent 8aab9d4 commit 90c2a91
Show file tree
Hide file tree
Showing 6 changed files with 27 additions and 19 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| Documentation | https://ozcanyarimdunya.github.io/argparge/ |
| Source code | https://github.com/ozcanyarimdunya/argparge/ |

`argparge` is a library that you can create beautiful class based cli application by using `argparse`.
`argparge` is a library that you can create beautiful class based cli application.

## Installation

Expand Down
Binary file modified docs/images/1.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/2.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/3.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 6 additions & 16 deletions docs/tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
## Simple usage (no subcommands)

```python
#!/usr/bin/env python3
from argparge import Application

app = Application(description="A simple argparge application")
Expand All @@ -20,9 +19,9 @@ print(app.arguments)
Let's have cli that user can `greet` a person, `list`, `create`, `sell` and item.

```python
#!/usr/bin/env python3
from argparge import Application
from argparge import Command
from argparge import ParentCommand


class GreetCommand(Command):
Expand All @@ -35,17 +34,6 @@ class GreetCommand(Command):
def handle(self, **arguments):
print("Greeting, ", arguments.get("name"))


class ItemCommand(Command):
name = "item"
help = "Get list of items"
parent = True

def add_arguments(self, parser: "Command"): ...

def handle(self, **arguments): ...


class ItemListCommand(Command):
name = "list"
help = "List all item"
Expand Down Expand Up @@ -83,14 +71,16 @@ class ItemSellCommand(Command):


if __name__ == "__main__":
app = Application(description="An simple commander application")
app = Application(description="A simple argparge application")
app.add_argument("-v", "--version", action="version", version="1.0.0")
app.add_commands(
GreetCommand(),
ItemCommand(
ParentCommand(
ItemListCommand(),
ItemCreateCommand(),
ItemSellCommand()
ItemSellCommand(),
name = "item",
help = "Get list of items"
)
)
app.run()
Expand Down
22 changes: 20 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,27 @@
[tool.poetry]
name = "argparge"
version = "0.1.1"
version = "0.1.2"
description = "A very simple tool to create beautiful console application by using native argparse."
authors = ["Ozcan Yarimdunya <ozcan.yarimdunya@sahibinden.com>"]
authors = ["Özcan Yarımdünya <ozcanyd@gmail.com>"]
license = "MIT"
repository = "https://github.com/ozcanyarimdunya/argparge"
homepage = "https://ozcanyarimdunya.github.io/argparge/"
documentation = "https://ozcanyarimdunya.github.io/argparge/"
readme = "README.md"
keywords = ["argparse", "argparge"]
classifiers = [
"Development Status :: 4 - Beta",
"License :: OSI Approved :: MIT License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Topic :: Software Development :: Libraries",
]
include = ["LICENCE"]
packages = [
{ include = "argparge" },
]
Expand Down

0 comments on commit 90c2a91

Please sign in to comment.