{"id":17494554,"url":"https://github.com/chandralegend/argonauts","last_synced_at":"2025-10-05T18:55:21.966Z","repository":{"id":250563006,"uuid":"834762049","full_name":"chandralegend/argonauts","owner":"chandralegend","description":"Functions to interactive command-line interfaces with ease.","archived":false,"fork":false,"pushed_at":"2025-03-10T02:28:05.000Z","size":572,"stargazers_count":8,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-29T19:21:48.622Z","etag":null,"topics":["argparser","interactive","pypi","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chandralegend.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-07-28T09:30:35.000Z","updated_at":"2024-09-09T10:50:56.000Z","dependencies_parsed_at":"2024-07-28T13:59:34.644Z","dependency_job_id":"49cb2704-609d-4f03-b371-a25fd51473db","html_url":"https://github.com/chandralegend/argonauts","commit_stats":null,"previous_names":["chandralegend/argonauts"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandralegend%2Fargonauts","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandralegend%2Fargonauts/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandralegend%2Fargonauts/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chandralegend%2Fargonauts/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chandralegend","download_url":"https://codeload.github.com/chandralegend/argonauts/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249297793,"owners_count":21246476,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["argparser","interactive","pypi","python"],"created_at":"2024-10-19T13:27:52.295Z","updated_at":"2025-10-05T18:55:16.929Z","avatar_url":"https://github.com/chandralegend.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n  # ARGONAUTS 🧑🏽‍🚀\n\n  [![PyPI version](https://badge.fury.io/py/argonauts.svg)](https://badge.fury.io/py/argonauts)\n  [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n  [![Python Versions](https://img.shields.io/pypi/pyversions/argonauts.svg)](https://pypi.org/project/argonauts/)\n\n\n---\n\nArgonauts is a Python library that transforms your functions into interactive command-line interfaces with ease. Using simple decorators, you can create engaging CLI experiences without the hassle of manual argument parsing.\n\n![Argonauts Demo](public/demo_0.gif)\n\n\u003c/div\u003e\n\n## 🚀 Features\n\n- Transform functions into interactive CLIs with a single decorator\n- Automatic type inference and validation\n- Email, Password Support with validation\n- Path Support with Autosuggestion\n- Chainable interactive functions\n\n## 📦 Installation\n\nInstall Argonauts using pip:\n\n```bash\npip install argonauts\n```\n\nInstall from source:\n\n```bash\ngit clone \u003crepo-url\u003e\ncd argonauts\npip install .\n```\n\n## 🛠 Usage\n\n### Basic Usage\n\nHere's a simple example of how to use Argonaut:\n\n```python\nfrom enum import Enum\nimport time\n\nfrom argonauts import argonaut\n\nclass PizzaSize(Enum):\n    SMALL = \"Small\"\n    MEDIUM = \"Medium\"\n    LARGE = \"Large\"\n\nclass Topping(Enum):\n    PEPPERONI = \"Pepperoni\"\n    MUSHROOMS = \"Mushrooms\"\n    ONIONS = \"Onions\"\n    SAUSAGE = \"Sausage\"\n    BELL_PEPPERS = \"Bell Peppers\"\n\n\n@argonaut(process_name=\"We are making your pizza! Keep calm!\")\ndef order_pizza(\n    size: PizzaSize,\n    toppings: list[Topping],\n    extra_cheese: bool = False,\n    delivery: bool = True,\n):\n    \"\"\"Order a delicious pizza with your favorite toppings.\"\"\"\n    pizza = f\"{size.value} pizza with {', '.join(t.value for t in toppings)}\"\n    if extra_cheese:\n        pizza += \" and extra cheese\"\n    print(f\"You've ordered: {pizza}\")\n\n    time.sleep(3)  # Simulate making the pizza\n\n    if delivery:\n        print(\"Your pizza will be delivered soon!\")\n    else:\n        print(\"Your pizza is ready for pickup!\")\n\norder_pizza()\n```\n\n### Chaining Interactive Functions\n\nArgonauts allows you to chain multiple interactive functions with the ability to share the previous arguments:\n\n```python\nfrom argonauts import argonaut, LogBook\n\nargs = LogBook()\n\n@argonaut(logbook=args)\ndef select_movie(title: str, genre: str):\n    rating = some_fn_to_get_rating(title)\n    return {\"title\": title, \"rating\": rating}\n\n@argonaut(logbook=args, include_params=[\"popcorn\", \"drinks\"]) # Include only the specified parameters\ndef select_snacks(movie: dict, genre: str, popcorn: bool, drinks: list[Drinks]):\n    print(f\"Watching {args.title} ({movie['rating']} stars)\") # Reuse the title argument\n    print(\"Genre:\", genre)\n    if popcorn:\n        print(\"- Popcorn\")\n    print(f\"- Drinks: {', '.join(drinks)}\")\n\ndef movie_night():\n    movie = select_movie()\n    select_snacks(movie=movie, genre=args.genre) # Reuse the genre argument\n\nmovie_night()\n```\n\n![Argonauts Demo](public/demo_1.gif)\n\n### Email, Password, and Path Support\n\nArgonauts provides built-in support for email, password, and path inputs with validation:\n\n```python\nfrom argonauts import argonaut\nfrom argonauts.inputs import Email, Password, Path\n\n@argonaut(process_name=\"Please wait...\")\ndef login(email: Email, password: Password):\n    \"\"\"Login with email and password.\"\"\"\n    ...\n\n@argonaut(process_name=\"Loading Configurations...\")\ndef configure(config_path: Path):\n    \"\"\"Load configurations from a file.\"\"\"\n    ...\n```\n![Argonauts Demo](public/demo_2.gif)\n\nYou can customize these Input types by inhereting them and overriding the `validate` method:\n\n```python\nfrom argonauts.inputs import Path\n\nclass JSONFile(Path):\n    def validate(self, value: str) -\u003e bool:\n        return super().validate(value) and value.endswith(\".json\")\n```\n\n## 🤝 Contributing\n\nWe welcome contributions! Please see our [Contributing Guide](CONTRIBUTING.md) for more details.\n\n## 📄 License\n\nArgonauts is released under the MIT License. See the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgements\n\n- [Questionary](https://github.com/tmbo/questionary) for providing an excellent prompt library\n- [Rich](https://github.com/Textualize/rich) for beautiful and interactive terminal output\n\n---\n\n\u003cdiv align=\"right\"\u003e\n  Made with ❤️ for the Developers by the Developers\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandralegend%2Fargonauts","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchandralegend%2Fargonauts","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchandralegend%2Fargonauts/lists"}