{"id":20623025,"url":"https://github.com/dluman/arglite","last_synced_at":"2026-03-01T19:34:23.234Z","repository":{"id":53885943,"uuid":"520581057","full_name":"dluman/arglite","owner":"dluman","description":"A light-weight Python CLI flag parser for the impatient.","archived":false,"fork":false,"pushed_at":"2025-11-28T22:13:32.000Z","size":37,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-12-01T01:06:32.712Z","etag":null,"topics":["argparse-alternative","argument-parser","argument-parsing","cli-argument-parser","cli-arguments"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/arglite/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dluman.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2022-08-02T16:58:52.000Z","updated_at":"2025-11-28T22:13:35.000Z","dependencies_parsed_at":"2024-02-25T00:20:15.300Z","dependency_job_id":"05d9bd81-301b-4dac-b028-eff08ab981ab","html_url":"https://github.com/dluman/arglite","commit_stats":{"total_commits":31,"total_committers":1,"mean_commits":31.0,"dds":0.0,"last_synced_commit":"da8239ba52407c335601bfa82479d8764d020df7"},"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"purl":"pkg:github/dluman/arglite","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Farglite","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Farglite/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Farglite/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Farglite/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dluman","download_url":"https://codeload.github.com/dluman/arglite/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dluman%2Farglite/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29981484,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-01T16:35:47.903Z","status":"ssl_error","status_checked_at":"2026-03-01T16:35:44.899Z","response_time":124,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["argparse-alternative","argument-parser","argument-parsing","cli-argument-parser","cli-arguments"],"created_at":"2024-11-16T12:25:33.264Z","updated_at":"2026-03-01T19:34:23.194Z","avatar_url":"https://github.com/dluman.png","language":"Python","readme":"# arglite\n\n[![PyPI version](https://img.shields.io/pypi/v/arglite)](https://pypi.org/project/arglite/)\n\nA lightweight, dynamic argument parsing library for Python programs with klugy support for typing variables.\n\nI made this for a teaching machine project I'm working on (I needed a custom argument parser for _reasons_),\nand I'm always too impatient to use `argparse`.\n\n## Installation\n\nFind this tool on `PyPI`: `pip install arglite`\n\n## Usage\n\nCheck this out:\n\n```python\nimport arglite\n\ndef main():\n  # Can include explicit requirement\n  print(arglite.parser.required.a)\n  # Can be an implicit requirement\n  print(arglite.parser.b)\n  # Can also be purely optional\n  print(arglite.parser.optional.c)\n  print(arglite.parser.optional.d)\n\nif __name__ == \"__main__\":\n  main()\n```\n\nRun using `python main.py -a Yo --b that is -c`.\n\nFor the more intrepid among us, this also works:\n\n```python\nfrom arglite import parser as cliarg\n\ndef main():\n  # Can include explicit requirement\n  print(cliarg.required.a)\n  # Can be an implicit requirement\n  print(cliarg.b)\n  # Can also be purely optional\n  print(cliarg.optional.c)\n  print(cliarg.optional.d)\n\nif __name__ == \"__main__\":\n  main()\n```\n\n### HELP!\n\nHelp now appears when no variables are provided or when requested by use of `-h` (`--h`) or `-help` (`--help`).\n\n### Errors\n\nWhen errors are present (i.e. flags are provided which aren't used in the code _or_ flags used aren't provided),\nyou'll see errors:\n\n```\n✗ ERROR: A value was provided for A, but the program doesn't call for it\n✗ ERROR: A value was expected for a, but not was provided as a flag\n✗ ERROR: A value was expected for b, but not was provided as a flag\n```\n\n\n## Notes\n\n* Flags with no value are automatically converted to `True` boolean\n* The module uses `ast.literal_eval`, so `\"{'a':'b'}\"` will convert to a `dict` (all quotes required)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdluman%2Farglite","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdluman%2Farglite","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdluman%2Farglite/lists"}