{"id":16471922,"url":"https://github.com/abranhe/arg","last_synced_at":"2025-07-01T09:05:55.502Z","repository":{"id":96043323,"uuid":"147621937","full_name":"abranhe/arg","owner":"abranhe","description":"Parse command-line arguments made easier.","archived":false,"fork":false,"pushed_at":"2021-09-19T07:00:54.000Z","size":10,"stargazers_count":4,"open_issues_count":0,"forks_count":1,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-04-30T14:32:35.824Z","etag":null,"topics":["argc","argument-parser","arguments","argv","cli","command-line","pip","python"],"latest_commit_sha":null,"homepage":"https://projects.abranhe.com/arg","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/abranhe.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}},"created_at":"2018-09-06T05:23:29.000Z","updated_at":"2021-09-17T23:01:35.000Z","dependencies_parsed_at":"2023-11-17T14:33:57.719Z","dependency_job_id":null,"html_url":"https://github.com/abranhe/arg","commit_stats":null,"previous_names":["abrahamhba/arg","abranhe/arg"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abranhe/arg","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Farg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Farg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Farg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Farg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abranhe","download_url":"https://codeload.github.com/abranhe/arg/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abranhe%2Farg/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262933262,"owners_count":23386778,"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":["argc","argument-parser","arguments","argv","cli","command-line","pip","python"],"created_at":"2024-10-11T12:15:33.067Z","updated_at":"2025-07-01T09:05:55.469Z","avatar_url":"https://github.com/abranhe.png","language":"Python","funding_links":["https://www.patreon.com/abranhe","https://paypal.me/abranhe/10"],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" id=\"top\"\u003e\n\t\u003ca href=\"https://pypi.org/project/arg\"\u003e\u003cimg src=\"https://cdn.abranhe.com/projects/arg/logo.svg\"\u003e\u003c/a\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003cbr\u003e\n\t\u003ca href=\"https://pypi.org/project/arg\"\u003e\u003cb\u003e𝘼𝙍𝙂\u003c/b\u003e\u003c/a\u003e\n\t: Parse command line arguments made easier...\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n\t\u003c!-- Travis CI --\u003e\n\t\u003ca href=\"https://travis-ci.org/abranhe/arg\"\u003e\u003cimg src=\"https://img.shields.io/travis/abranhe/arg.svg?logo=travis\" /\u003e\u003c/a\u003e\n\t\u003c!-- LICENSE --\u003e\n\t\u003ca href=\"https://github.com/abranhe/arg/blob/master/LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/github/license/abranhe/arg.svg\" /\u003e\u003c/a\u003e\n\t\u003c!-- @abranhe --\u003e\n\t\u003ca href=\"https://github.com/abranhe\"\u003e\u003cimg src=\"https://abranhe.com/badge.svg\"\u003e\u003c/a\u003e\n\t\u003c!-- Cash me --\u003e\n\t\u003ca href=\"https://cash.me/$abranhe\"\u003e\u003cimg src=\"https://cdn.abranhe.com/badges/cash-me.svg\"\u003e\u003c/a\u003e\n\t\u003c!-- Patreon --\u003e\n\t\u003ca href=\"https://www.patreon.com/abranhe\"\u003e\u003cimg src=\"https://cdn.abranhe.com/badges/patreon.svg\" /\u003e\u003c/a\u003e\n\t\u003c!-- Paypal --\u003e\n\t\u003ca href=\"https://paypal.me/abranhe/10\"\u003e\u003cimg src=\"https://cdn.abranhe.com/badges/paypal.svg\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\n# Install\n\n```\npip install arg\n```\n\n# Usage\n\n```\n$ python test.py ford -m mustang --year 2017 red\n```\n\n\u003e *test.py*\n\n```py\nimport arg\n\n# argv without file name\nprint(arg())\n# =\u003e ['ford', '-m', 'mustang', '--year', '2017', 'red']\n\n# argv\nprint(arg.v())\n# =\u003e ['test.py', 'ford', '-m', 'mustang', '--year', '2017', 'red']\n\n# argc\nprint(arg.c())\n# =\u003e 7\n\n# args as string\nprint(arg.s())\n# =\u003e test.py ford -m mustang --year 2017 red\n\n# file name\nprint(arg.fileName())\n# =\u003e test.py\n\n# argument at n\nprint(arg.at(2))\n# =\u003e -m\n\n```\n\n# API\n\n### `arg()`\n\n\u003e Return an array with the arguments without the file name\n\n**Return Type**: `list`\n\n### `.v()`\n\n\u003e Return an array with all the arguments. (**arg.v** ~\u003e argv *Argumet Vector*)\n\n**Return Type**: `list`\n\n### `.c()`\n\n\u003e Return an array with all the arguments. (**arg.c** ~\u003e argc *Argument Count*)\n\n**Return Type**: `int`\n\n### `.s()`\n\n\u003e Return an string with all the arguments. (arg.s ~\u003e Arguments to String)\n\n**Return Type**: `str`\n\n### `.fileName()`\n\n\u003e Return an string with the name of the file\n\n**Return Type**: `str`\n\n### `.at(n)`\n\n\u003e Return the value of the argument at value at **n**, otherwise **404**\n\n**Return Type**: `str`\n\n# Related\n\n- [**lupe**](https://github.com/abranhe/lupe): A better CLI Helper.\n\n# Team\n\n|[![Carlos Abraham Logo](https://avatars3.githubusercontent.com/u/21347264?s=50\u0026v=4)](https://abranhe.com)|\n| :-: |\n| [Carlos Abraham](https://github.com/abranhe) |\n\n# License\n\n[MIT](https://github.com/abranhe/arg/blob/master/LICENSE) License © [Carlos Abraham](https://github.com/abranhe/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Farg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabranhe%2Farg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabranhe%2Farg/lists"}