argparge


Nameargparge JSON
Version 0.1.5 PyPI version JSON
download
home_pagehttps://ozcanyarimdunya.github.io/argparge/
SummaryA very simple tool to create beautiful console application by using native argparse.
upload_time2023-11-20 07:33:49
maintainer
docs_urlNone
authorÖzcan Yarımdünya
requires_python>=3.9,<4.0
licenseMIT
keywords argparse argparge
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Argparge

> A very simple tool to create beautiful console application by using native argparse.

| Project       | Commander                                    |
|---------------|----------------------------------------------|
| Author        | Özcan Yarımdünya                             |
| 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.

## Installation

Works on `python3+` with no extra dependencies.

```shell
pip install argparge
```

## Usage

**example.py**

```python
from argparge import Application
from argparge import Command


class GreetCommand(Command):
    name = "greet"
    help = "Greeting a person"

    def add_arguments(self, parser: "Command"):
        parser.add_argument("name", help="Person name")

    def handle(self, **arguments):
        print("Greeting, ", arguments.get("name"))


if __name__ == '__main__':
    app = Application(description="A simple argparge application")
    app.add_argument("-V", "--version", action="version", version="1.0.0")
    app.add_commands(
        GreetCommand(),
    )
    app.run()
```

If we run we get such output.

![gif](./docs/images/1.gif)

For more checkout [tutorials.](https://ozcanyarimdunya.github.io/argparge/tutorial/)

## LICENSE

```text
MIT License

Copyright (c) 2023 yarimdunya.com

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

```

            

Raw data

            {
    "_id": null,
    "home_page": "https://ozcanyarimdunya.github.io/argparge/",
    "name": "argparge",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.9,<4.0",
    "maintainer_email": "",
    "keywords": "argparse,argparge",
    "author": "\u00d6zcan Yar\u0131md\u00fcnya",
    "author_email": "ozcanyd@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/6c/b0/b1a0d783bb67f2f49dc46103652b7fdc62cc0f72617e7066924303c96bbf/argparge-0.1.5.tar.gz",
    "platform": null,
    "description": "# Argparge\n\n> A very simple tool to create beautiful console application by using native argparse.\n\n| Project       | Commander                                    |\n|---------------|----------------------------------------------|\n| Author        | \u00d6zcan Yar\u0131md\u00fcnya                             |\n| Documentation | https://ozcanyarimdunya.github.io/argparge/  |\n| Source code   | https://github.com/ozcanyarimdunya/argparge/ |\n\n`argparge` is a library that you can create beautiful class based cli application.\n\n## Installation\n\nWorks on `python3+` with no extra dependencies.\n\n```shell\npip install argparge\n```\n\n## Usage\n\n**example.py**\n\n```python\nfrom argparge import Application\nfrom argparge import Command\n\n\nclass GreetCommand(Command):\n    name = \"greet\"\n    help = \"Greeting a person\"\n\n    def add_arguments(self, parser: \"Command\"):\n        parser.add_argument(\"name\", help=\"Person name\")\n\n    def handle(self, **arguments):\n        print(\"Greeting, \", arguments.get(\"name\"))\n\n\nif __name__ == '__main__':\n    app = Application(description=\"A simple argparge application\")\n    app.add_argument(\"-V\", \"--version\", action=\"version\", version=\"1.0.0\")\n    app.add_commands(\n        GreetCommand(),\n    )\n    app.run()\n```\n\nIf we run we get such output.\n\n![gif](./docs/images/1.gif)\n\nFor more checkout [tutorials.](https://ozcanyarimdunya.github.io/argparge/tutorial/)\n\n## LICENSE\n\n```text\nMIT License\n\nCopyright (c) 2023 yarimdunya.com\n\nPermission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A very simple tool to create beautiful console application by using native argparse.",
    "version": "0.1.5",
    "project_urls": {
        "Documentation": "https://ozcanyarimdunya.github.io/argparge/",
        "Homepage": "https://ozcanyarimdunya.github.io/argparge/",
        "Repository": "https://github.com/ozcanyarimdunya/argparge"
    },
    "split_keywords": [
        "argparse",
        "argparge"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a151481a7b75bd97fc170997122b4b71bce9eecc016351f310d91c2a30bc051e",
                "md5": "15aac65e3bbe666e793965e0d980b71d",
                "sha256": "d4685919302f42ca35ab8a62fc114666505888dead2cf8189aafa14a81933b84"
            },
            "downloads": -1,
            "filename": "argparge-0.1.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "15aac65e3bbe666e793965e0d980b71d",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9,<4.0",
            "size": 4156,
            "upload_time": "2023-11-20T07:33:47",
            "upload_time_iso_8601": "2023-11-20T07:33:47.286507Z",
            "url": "https://files.pythonhosted.org/packages/a1/51/481a7b75bd97fc170997122b4b71bce9eecc016351f310d91c2a30bc051e/argparge-0.1.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6cb0b1a0d783bb67f2f49dc46103652b7fdc62cc0f72617e7066924303c96bbf",
                "md5": "ca4f0ea3b531119289e727db7aeb0362",
                "sha256": "daed0349730b7c74572e83ffd6c019c371ea286364997cf405b09204b25d7099"
            },
            "downloads": -1,
            "filename": "argparge-0.1.5.tar.gz",
            "has_sig": false,
            "md5_digest": "ca4f0ea3b531119289e727db7aeb0362",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9,<4.0",
            "size": 3133,
            "upload_time": "2023-11-20T07:33:49",
            "upload_time_iso_8601": "2023-11-20T07:33:49.877956Z",
            "url": "https://files.pythonhosted.org/packages/6c/b0/b1a0d783bb67f2f49dc46103652b7fdc62cc0f72617e7066924303c96bbf/argparge-0.1.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-11-20 07:33:49",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "ozcanyarimdunya",
    "github_project": "argparge",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "argparge"
}
        
Elapsed time: 0.24351s