argonautCli


NameargonautCli JSON
Version 1.2.0 PyPI version JSON
download
home_pagehttps://github.com/sc4rfurry/argon4ut
SummaryA custom argument parsing library for CLI applications with a focus on simplicity and ease of use. ArgøNaut is designed to make it easy to create powerful and flexible command-line interfaces.
upload_time2024-10-16 07:16:14
maintainerNone
docs_urlNone
authorsc4rfurry
requires_python>=3.6
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # ArgøNaut: Advanced Argument Parsing Library

<p align="center">
  <img src="Docs/Argonaut-Logo.png" alt="ArgøNaut Logo" width="60%" style="max-width: 500px;">
</p>

<p align="center">
  <a href="https://github.com/sc4rfurry/argonaut"><img src="https://img.shields.io/github/stars/sc4rfurry/Argonaut?style=social" alt="GitHub stars"></a>
  <a href="https://github.com/sc4rfurry/argonaut/issues"><img src="https://img.shields.io/github/issues/sc4rfurry/Argonaut" alt="GitHub issues"></a>
  <a href="https://github.com/sc4rfurry/argonaut/blob/main/LICENSE"><img src="https://img.shields.io/github/license/sc4rfurry/Argonaut" alt="License"></a>
</p>

---

## 📚 Table of Contents

1. [Introduction](#introduction)
2. [Features](#-features)
3. [Installation](#-installation)
4. [Quick Start](#-quick-start)
5. [Advanced Usage](#-advanced-usage)
6. [Plugin System](#-plugin-system)
7. [API Reference](#-api-reference)
8. [Examples](#-examples)
9. [Contributing](#-contributing)
10. [License](#-license)

---

## 🚀 Introduction

**ArgøNaut** is a sophisticated and flexible command-line argument parsing library for Python applications. It extends the capabilities of standard argument parsing libraries with advanced features, a robust plugin system, and cross-platform compatibility.

---

## ✨ Features

- 🎨 Intuitive API for defining and parsing arguments
- 🌳 Support for subcommands and nested command structures
- 🔌 Robust plugin system for extensibility
- 💻 Cross-platform compatibility (Windows, macOS, Linux)
- 🛡️ Advanced input sanitization and error handling
- 📚 Customizable help generation and formatting
- 🐚 Shell completion script generation for multiple shells
- 📊 Progress bar and colored output capabilities
- 📁 Configuration file support (YAML, JSON)
- 🌿 Environment variable integration
- 📘 Automatic man page generation
- ⚡ Asynchronous support for argument parsing and plugin execution

---

## 📦 Installation

Install ArgøNaut using pip:
```bash
pip install argonautCli
```

## 🚀 Quick Start

```python
from argonaut import Argonaut


parser = Argonaut(description="My awesome CLI tool")
parser.add("--name", help="Your name")
parser.add("--age", type=int, help="Your age")
args = parser.parse()

print(f"Hello, {args['name']}! You are {args['age']} years old.")
```

## 🔧 Advanced Usage

### Asynchronous Support

```python
import asyncio
from argonaut import Argonaut


parser = Argonaut()
parser.add("--async-option", help="An async option")

async def main():
   args = await parser.parse_async()
   result = await parser.execute_plugin_async("my_plugin", args)
   
print(result)
```

### Environment Variables

```python
from argonaut import Argonaut


parser = Argonaut()
parser.add("--api-key", env_var="API_KEY", help="API key (can be set via API_KEY env var)")
args = parser.parse()

print(f"API Key: {args['api_key']}")
```

## 🔌 Plugin System

ArgøNaut features a powerful plugin system that allows you to extend the functionality of your CLI applications.

```python
from argonaut import Plugin, PluginMetadata
import asyncio


class MyPlugin(Plugin):
   @property
   def metadata(self) -> PluginMetadata:
      return PluginMetadata(
      name="my_plugin",
      version="1.0.0",
      description="A sample plugin for ArgøNaut",
      author="Your Name",
      website="https://example.com",
      tags=["sample", "demo"]
      )

   def initialize(self, context):
      self.context = context
   def execute(self, args):
      return f"Hello from MyPlugin! Args: {args}"
   async def execute_async(self, args):
      # Asynchronous execution method
      return await some_async_operation(args)

def on_load(self):
print("Plugin loaded")

def on_unload(self):
print("Plugin unloaded")

def on_command_execution(self, command):
print(f"Command '{command}' is being executed")
```


---

## 📚 API Reference

For a complete API reference, please visit our [documentation](https://sc4rfurry.github.io/Argonaut-Docs/).

---

## 📋 Examples

For more examples, please refer to the [examples](examples/) directory in the repository.

---

## 🤝 Contributing

We welcome contributions to ArgøNaut! Please see our [Contributing Guide](CONTRIBUTING.md) for more details on how to get started.

---

## 📄 License

ArgøNaut is released under the MIT License. See the [LICENSE](LICENSE) file for full details.

---

For more information and detailed documentation, visit [ArgøNaut's Documentation](https://sc4rfurry.github.io/Argonaut-Docs/).

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/sc4rfurry/argon4ut",
    "name": "argonautCli",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": null,
    "keywords": null,
    "author": "sc4rfurry",
    "author_email": "akalucifr@protonmail.ch",
    "download_url": "https://files.pythonhosted.org/packages/26/5e/d47965df92e5450fc0b7d1cec01ff552a001cd4c9b56bd141906d6eeff29/argonautcli-1.2.0.tar.gz",
    "platform": null,
    "description": "# Arg\u00f8Naut: Advanced Argument Parsing Library\r\n\r\n<p align=\"center\">\r\n  <img src=\"Docs/Argonaut-Logo.png\" alt=\"Arg\u00f8Naut Logo\" width=\"60%\" style=\"max-width: 500px;\">\r\n</p>\r\n\r\n<p align=\"center\">\r\n  <a href=\"https://github.com/sc4rfurry/argonaut\"><img src=\"https://img.shields.io/github/stars/sc4rfurry/Argonaut?style=social\" alt=\"GitHub stars\"></a>\r\n  <a href=\"https://github.com/sc4rfurry/argonaut/issues\"><img src=\"https://img.shields.io/github/issues/sc4rfurry/Argonaut\" alt=\"GitHub issues\"></a>\r\n  <a href=\"https://github.com/sc4rfurry/argonaut/blob/main/LICENSE\"><img src=\"https://img.shields.io/github/license/sc4rfurry/Argonaut\" alt=\"License\"></a>\r\n</p>\r\n\r\n---\r\n\r\n## \ud83d\udcda Table of Contents\r\n\r\n1. [Introduction](#introduction)\r\n2. [Features](#-features)\r\n3. [Installation](#-installation)\r\n4. [Quick Start](#-quick-start)\r\n5. [Advanced Usage](#-advanced-usage)\r\n6. [Plugin System](#-plugin-system)\r\n7. [API Reference](#-api-reference)\r\n8. [Examples](#-examples)\r\n9. [Contributing](#-contributing)\r\n10. [License](#-license)\r\n\r\n---\r\n\r\n## \ud83d\ude80 Introduction\r\n\r\n**Arg\u00f8Naut** is a sophisticated and flexible command-line argument parsing library for Python applications. It extends the capabilities of standard argument parsing libraries with advanced features, a robust plugin system, and cross-platform compatibility.\r\n\r\n---\r\n\r\n## \u2728 Features\r\n\r\n- \ud83c\udfa8 Intuitive API for defining and parsing arguments\r\n- \ud83c\udf33 Support for subcommands and nested command structures\r\n- \ud83d\udd0c Robust plugin system for extensibility\r\n- \ud83d\udcbb Cross-platform compatibility (Windows, macOS, Linux)\r\n- \ud83d\udee1\ufe0f Advanced input sanitization and error handling\r\n- \ud83d\udcda Customizable help generation and formatting\r\n- \ud83d\udc1a Shell completion script generation for multiple shells\r\n- \ud83d\udcca Progress bar and colored output capabilities\r\n- \ud83d\udcc1 Configuration file support (YAML, JSON)\r\n- \ud83c\udf3f Environment variable integration\r\n- \ud83d\udcd8 Automatic man page generation\r\n- \u26a1 Asynchronous support for argument parsing and plugin execution\r\n\r\n---\r\n\r\n## \ud83d\udce6 Installation\r\n\r\nInstall Arg\u00f8Naut using pip:\r\n```bash\r\npip install argonautCli\r\n```\r\n\r\n## \ud83d\ude80 Quick Start\r\n\r\n```python\r\nfrom argonaut import Argonaut\r\n\r\n\r\nparser = Argonaut(description=\"My awesome CLI tool\")\r\nparser.add(\"--name\", help=\"Your name\")\r\nparser.add(\"--age\", type=int, help=\"Your age\")\r\nargs = parser.parse()\r\n\r\nprint(f\"Hello, {args['name']}! You are {args['age']} years old.\")\r\n```\r\n\r\n## \ud83d\udd27 Advanced Usage\r\n\r\n### Asynchronous Support\r\n\r\n```python\r\nimport asyncio\r\nfrom argonaut import Argonaut\r\n\r\n\r\nparser = Argonaut()\r\nparser.add(\"--async-option\", help=\"An async option\")\r\n\r\nasync def main():\r\n   args = await parser.parse_async()\r\n   result = await parser.execute_plugin_async(\"my_plugin\", args)\r\n   \r\nprint(result)\r\n```\r\n\r\n### Environment Variables\r\n\r\n```python\r\nfrom argonaut import Argonaut\r\n\r\n\r\nparser = Argonaut()\r\nparser.add(\"--api-key\", env_var=\"API_KEY\", help=\"API key (can be set via API_KEY env var)\")\r\nargs = parser.parse()\r\n\r\nprint(f\"API Key: {args['api_key']}\")\r\n```\r\n\r\n## \ud83d\udd0c Plugin System\r\n\r\nArg\u00f8Naut features a powerful plugin system that allows you to extend the functionality of your CLI applications.\r\n\r\n```python\r\nfrom argonaut import Plugin, PluginMetadata\r\nimport asyncio\r\n\r\n\r\nclass MyPlugin(Plugin):\r\n   @property\r\n   def metadata(self) -> PluginMetadata:\r\n      return PluginMetadata(\r\n      name=\"my_plugin\",\r\n      version=\"1.0.0\",\r\n      description=\"A sample plugin for Arg\u00f8Naut\",\r\n      author=\"Your Name\",\r\n      website=\"https://example.com\",\r\n      tags=[\"sample\", \"demo\"]\r\n      )\r\n\r\n   def initialize(self, context):\r\n      self.context = context\r\n   def execute(self, args):\r\n      return f\"Hello from MyPlugin! Args: {args}\"\r\n   async def execute_async(self, args):\r\n      # Asynchronous execution method\r\n      return await some_async_operation(args)\r\n\r\ndef on_load(self):\r\nprint(\"Plugin loaded\")\r\n\r\ndef on_unload(self):\r\nprint(\"Plugin unloaded\")\r\n\r\ndef on_command_execution(self, command):\r\nprint(f\"Command '{command}' is being executed\")\r\n```\r\n\r\n\r\n---\r\n\r\n## \ud83d\udcda API Reference\r\n\r\nFor a complete API reference, please visit our [documentation](https://sc4rfurry.github.io/Argonaut-Docs/).\r\n\r\n---\r\n\r\n## \ud83d\udccb Examples\r\n\r\nFor more examples, please refer to the [examples](examples/) directory in the repository.\r\n\r\n---\r\n\r\n## \ud83e\udd1d Contributing\r\n\r\nWe welcome contributions to Arg\u00f8Naut! Please see our [Contributing Guide](CONTRIBUTING.md) for more details on how to get started.\r\n\r\n---\r\n\r\n## \ud83d\udcc4 License\r\n\r\nArg\u00f8Naut is released under the MIT License. See the [LICENSE](LICENSE) file for full details.\r\n\r\n---\r\n\r\nFor more information and detailed documentation, visit [Arg\u00f8Naut's Documentation](https://sc4rfurry.github.io/Argonaut-Docs/).\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A custom argument parsing library for CLI applications with a focus on simplicity and ease of use. Arg\u00f8Naut is designed to make it easy to create powerful and flexible command-line interfaces.",
    "version": "1.2.0",
    "project_urls": {
        "Homepage": "https://github.com/sc4rfurry/argon4ut"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "837ad5f416ecf232d3a8e21d28780ee9281f00594b6b40a6f83e472b2302bb2a",
                "md5": "5988a6b3b49f70f645d6826b3cca4fb1",
                "sha256": "49940afdfcecb427b71cd8779bf32f1d2a54f68b28f9605faca23e2c47ef1f73"
            },
            "downloads": -1,
            "filename": "argonautCli-1.2.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5988a6b3b49f70f645d6826b3cca4fb1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 24409,
            "upload_time": "2024-10-16T07:16:13",
            "upload_time_iso_8601": "2024-10-16T07:16:13.355036Z",
            "url": "https://files.pythonhosted.org/packages/83/7a/d5f416ecf232d3a8e21d28780ee9281f00594b6b40a6f83e472b2302bb2a/argonautCli-1.2.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "265ed47965df92e5450fc0b7d1cec01ff552a001cd4c9b56bd141906d6eeff29",
                "md5": "bbf85db1660a1c3512636b12dfac9182",
                "sha256": "ed318a12ac5009b797dff433d3f6766f8d313f5c38dcf43ae85d04442cdab9e6"
            },
            "downloads": -1,
            "filename": "argonautcli-1.2.0.tar.gz",
            "has_sig": false,
            "md5_digest": "bbf85db1660a1c3512636b12dfac9182",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 22869,
            "upload_time": "2024-10-16T07:16:14",
            "upload_time_iso_8601": "2024-10-16T07:16:14.896344Z",
            "url": "https://files.pythonhosted.org/packages/26/5e/d47965df92e5450fc0b7d1cec01ff552a001cd4c9b56bd141906d6eeff29/argonautcli-1.2.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-16 07:16:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "sc4rfurry",
    "github_project": "argon4ut",
    "github_not_found": true,
    "lcname": "argonautcli"
}
        
Elapsed time: 0.36306s