{"id":15963187,"url":"https://github.com/mamoruds/typed-cap","last_synced_at":"2025-05-07T06:04:06.630Z","repository":{"id":41275682,"uuid":"409593577","full_name":"MamoruDS/typed-cap","owner":"MamoruDS","description":"A python Command-line Argument Parser that provides typing support.","archived":false,"fork":false,"pushed_at":"2023-12-17T07:36:17.000Z","size":703,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-05-07T06:04:00.807Z","etag":null,"topics":["argparser","command-line-parser","python3"],"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/MamoruDS.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,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-09-23T13:00:29.000Z","updated_at":"2023-05-24T12:34:38.000Z","dependencies_parsed_at":"2023-12-17T08:28:23.071Z","dependency_job_id":"f4d2ade2-aa98-4860-a895-3966610ebd41","html_url":"https://github.com/MamoruDS/typed-cap","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MamoruDS%2Ftyped-cap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MamoruDS%2Ftyped-cap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MamoruDS%2Ftyped-cap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MamoruDS%2Ftyped-cap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MamoruDS","download_url":"https://codeload.github.com/MamoruDS/typed-cap/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252823921,"owners_count":21809713,"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","command-line-parser","python3"],"created_at":"2024-10-07T16:23:11.574Z","updated_at":"2025-05-07T06:04:06.608Z","avatar_url":"https://github.com/MamoruDS.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# typed-cap\n\n[![pypi](https://img.shields.io/pypi/v/typed-cap?style=flat-square)](https://pypi.org/project/typed-cap/)\n[![style](https://img.shields.io/badge/code%20style-black-black?style=flat-square)](https://github.com/psf/black)\n\nCap is a python **C**ommand-line **A**rgument **P**arser that provides **typing** support. Using Cap requires less code to generate a more easy to use parser.\n\n## Usage\n\n⚠️ `typed_cap` required `python\u003e=3.9`\n\n```\npip install typed_cap\n```\n\n### Quick Example\n\n```python\nfrom typed_cap import Cap\n\n\nclass Args:\n    \"\"\"description here\"\"\"\n\n    # @alias=c\n    config: str | None\n    \"\"\"file path to config file\"\"\"\n\n    # @alias=d\n    depth: int\n    \"\"\"depth of search\"\"\"\n\n    dry_run: bool = True\n    \"\"\"run without making any changes\"\"\"\n\n\ncap = Cap(Args)\nparsed = cap.parse()\n\nprint(parsed.args.__dict__)\nprint(parsed.argv)\n```\n\n```shell\npython demo.py\n# Cap.parse: option depth:int is required but it is missing\n#         ArgsParserMissingArgument\n\npython demo.py --help\n# description here\n#\n# OPTIONS:\n#     -c,--config     file path to config file\n#     -d,--depth      depth of search\n#        --dry_run    run without making any changes (default: True)\n#     -h,--help       display the help text\n\npython demo.py -d 5 hello typed cap\n# {'depth': 5, 'config': None, 'dry_run': True}\n# ['hello', 'typed', 'cap']\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamoruds%2Ftyped-cap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmamoruds%2Ftyped-cap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmamoruds%2Ftyped-cap/lists"}