{"id":17044762,"url":"https://github.com/keredson/darp","last_synced_at":"2026-01-29T10:49:58.799Z","repository":{"id":57417869,"uuid":"200138372","full_name":"keredson/darp","owner":"keredson","description":"Derek's Argument Parser","archived":false,"fork":false,"pushed_at":"2022-07-15T21:22:24.000Z","size":23,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-08T02:28:07.781Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/keredson.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}},"created_at":"2019-08-02T00:49:28.000Z","updated_at":"2022-07-15T21:22:27.000Z","dependencies_parsed_at":"2022-09-13T21:10:20.188Z","dependency_job_id":null,"html_url":"https://github.com/keredson/darp","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keredson/darp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keredson%2Fdarp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keredson%2Fdarp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keredson%2Fdarp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keredson%2Fdarp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keredson","download_url":"https://codeload.github.com/keredson/darp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keredson%2Fdarp/sbom","scorecard":{"id":556033,"data":{"date":"2025-08-11","repo":{"name":"github.com/keredson/darp","commit":"af333192ad98b680e4e8789f800d711beb3b21aa"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 0/19 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}}]},"last_synced_at":"2025-08-20T12:21:35.118Z","repository_id":57417869,"created_at":"2025-08-20T12:21:35.119Z","updated_at":"2025-08-20T12:21:35.119Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28875963,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T10:31:27.438Z","status":"ssl_error","status_checked_at":"2026-01-29T10:31:01.017Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6: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":[],"created_at":"2024-10-14T09:35:24.229Z","updated_at":"2026-01-29T10:49:58.760Z","avatar_url":"https://github.com/keredson.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Derek's Argument Parser\n=======================\n\n[![Build Status](https://travis-ci.org/keredson/darp.svg?branch=master)](https://travis-ci.org/keredson/darp)\n\nThis is a Pythonic argument parser.  It automatically converts your sys.argv to `*args, **kwargs` and passes them to whatever function you wish.  It also automatically generates usage messages and handles python type checking / conversions.\n\nFor example, if you have the following program:\n```python\nimport darp\n\ndef serve(name, port:int=8888):\n  '''Example DArP (Derek's Argument Parser) app...'''\n  print('running', name, 'on', port)\n  \nif __name__=='__main__':\n  darp.prep(serve).run()\n```\nAnd run it with arguments, you'll get the following output:\n\n```\n$ python3 example.py\nExample DArP (Derek's Argument Parser) app...\nserve() missing 1 required positional argument: 'name'\nusage: python3 example.py \u003cname\u003e [--port \u003cint\u003e]\n```\n\nRequired Parameters\n-------------------\n\n`*arg` parameters are always required.  Keyword parameters (like `--port`) can be marked as required like this:\n```python\ndef serve(name, port:int=darp.REQUIRED):\n  print('running', name, 'on', port)\n  \nif __name__=='__main__':\n  darp.prep(serve, p='port').run()\n```\nIf run without the required argument this error is printed:\n\n```\n$ python3 example_required.py \nserve() missing 1 required argument: '-p|--port'\nusage: python3 example_required.py \u003cname\u003e --port \u003cint\u003e\n```\n\n\nShortcut Parameters\n-------------------\nKeyword parameters are prefixed with `--` (like `--port`).  A shortcut parameter is when you want your script to respond to `-p 7777` as if the user typed `--port 7777`.  You specify this relationship via keyword arguments to `darp.prep()`, like:\n\n```python\nif __name__=='__main__':\n  darp.prep(serve, p='port').run()\n```\n\nOr by additions to the defaults for a function, like:\n```python\ndef serve(name, port:int=8888+darp.alt('p')):\n  print('running', name, 'on', port)\n```\n\nBoth are equivalent.  The latter takes precedence.\n\nExample:\n```\n$ python3 example.py server -p 7777\nrunning server on 7777\n```\n\nExistence Parameters\n--------------------\nKeyword parameters without values are considered `True` if present.  For example:\n\n```python\ndef doit(dry_run=False):\n  if dry_run:\n    print('doing a dry run...')\n  else:\n    print('doing it for real!')\n  \nif __name__=='__main__':\n  darp.prep(doit).run()\n```\n\nExample run:\n```\n$ python3 example_existence.py --dry-run\ndoing a dry run...\n```\n\nNotice that `--dry-run` is mapped to the `dry_run` kwarg.\n\nExistence params can be combined if using shortcuts.  See:\n\n```python\ndef doit(apple=False, banana=False):\n  print('apple', apple)\n  print('banana', banana)\n  \nif __name__=='__main__':\n  darp.prep(doit, a='apple', b='banana').run()\n```\n\nExample run:\n\n```\n$ python3 example_squashed_existence.py -ab\napple True\nbanana True\n```\n\nEquals in Arguments\n-------------------\nThese are equivalent:\n```\n$ python3 example.py --port 7777\n$ python3 example.py --port=7777\n```\n\nHow to Install\n--------------\n\n```bash\n$ pip3 install darp\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeredson%2Fdarp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeredson%2Fdarp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeredson%2Fdarp/lists"}