{"id":16725173,"url":"https://github.com/apollo-roboto/python-runrun","last_synced_at":"2025-04-07T20:43:47.723Z","repository":{"id":208358497,"uuid":"678094916","full_name":"Apollo-Roboto/python-runrun","owner":"Apollo-Roboto","description":"A typed command line parser for Python","archived":false,"fork":false,"pushed_at":"2024-06-17T02:08:38.000Z","size":217,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-13T22:24:54.416Z","etag":null,"topics":["cli","library","parser","python","typed"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/runrun/","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/Apollo-Roboto.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2023-08-13T16:57:39.000Z","updated_at":"2024-06-17T02:08:42.000Z","dependencies_parsed_at":"2023-12-13T05:20:42.702Z","dependency_job_id":"2641a424-46be-4e0a-b15b-023921becfbc","html_url":"https://github.com/Apollo-Roboto/python-runrun","commit_stats":null,"previous_names":["apollo-roboto/python-runrun"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Roboto%2Fpython-runrun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Roboto%2Fpython-runrun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Roboto%2Fpython-runrun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Apollo-Roboto%2Fpython-runrun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Apollo-Roboto","download_url":"https://codeload.github.com/Apollo-Roboto/python-runrun/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247729140,"owners_count":20986390,"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":["cli","library","parser","python","typed"],"created_at":"2024-10-12T22:48:07.479Z","updated_at":"2025-04-07T20:43:47.295Z","avatar_url":"https://github.com/Apollo-Roboto.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# RunRun\n\n![PyPI Version](https://img.shields.io/pypi/v/runrun.svg)\n![PyPI Python Version](https://img.shields.io/pypi/pyversions/runrun.svg?logo=python\u0026logoColor=gold)\n![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)\n![License MIT](https://img.shields.io/pypi/l/runrun)\n\nA typed command line parser for Python.\n\n## Example\n\n```py\n# main.py\nimport random\nfrom runrun import Command\nfrom runrun.models import Argument\nfrom runrun.runner import Runner\n\nclass RollCommand(Command):\n    def __init__(self):\n        super().__init__(\n            name=\"roll\",\n            description=\"Roll a dice\",\n        )\n\n    num_of_dice = Argument(\n        int,\n        name=\"num\",\n        description=\"Number of dice to roll\",\n        default_value=1,\n    )\n\n    faces = Argument(\n        int,\n        name=\"faces\",\n        description=\"how many faces per dice\",\n        default_value=6,\n    )\n\n    def run(self):\n        total = 0\n        for _ in range(self.num_of_dice.value):\n            total += random.randint(1, self.faces.value)\n\n        print(f\"🎲 {total}\")\n\nRunner(RollCommand()).run()\n\n```\n\nRun it!\n```powershell\npython .\\main.py --num 5 --faces 20\n```\n\nOr check the generated help command.\n```powershell\npython .\\main.py help\n```\n\n```txt\n\n  Roll a dice\n\n USAGE \n  roll [arguments]\n\n ARGUMENTS \n  faces             --faces \u003cint\u003e                              | how many faces per dice\n  num               --num \u003cint\u003e                                | Number of dice to roll\n\n COMMANDS \n  Help              help                                       | Show help about this command\n\n```\n\nThe help command has it's own help docs !?\n```powershell\npython .\\main.py help help\n```\n\n```txt\n\n  Show help about this command\n\n USAGE \n  roll help [arguments]\n\n ARGUMENTS \n  Filter            --filter \u003cstr\u003e                             | Filter the help results, this can help to find what you are looking for\n  Output Format     --format {STD, JSON}                       | The output format of the command details\n  Required Only     --required-only [true|false]               | Only show required arguments\n\n COMMANDS \n  Help              help                                       | Show help about this command\n```\n\n*Finally a help that can be filtered*\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollo-roboto%2Fpython-runrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fapollo-roboto%2Fpython-runrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fapollo-roboto%2Fpython-runrun/lists"}