{"id":37079266,"url":"https://github.com/jyn514/configparse","last_synced_at":"2026-01-14T09:35:45.047Z","repository":{"id":53527397,"uuid":"201646823","full_name":"jyn514/configparse","owner":"jyn514","description":"Argparse for config files","archived":true,"fork":false,"pushed_at":"2024-03-20T17:47:41.000Z","size":30,"stargazers_count":1,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2026-01-06T11:49:26.147Z","etag":null,"topics":["cli-library","configuration","parsing"],"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/jyn514.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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-10T15:16:10.000Z","updated_at":"2024-03-20T17:48:09.000Z","dependencies_parsed_at":"2022-09-02T17:22:52.097Z","dependency_job_id":null,"html_url":"https://github.com/jyn514/configparse","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/jyn514/configparse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jyn514%2Fconfigparse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jyn514%2Fconfigparse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jyn514%2Fconfigparse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jyn514%2Fconfigparse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jyn514","download_url":"https://codeload.github.com/jyn514/configparse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jyn514%2Fconfigparse/sbom","scorecard":{"id":545778,"data":{"date":"2025-08-11","repo":{"name":"github.com/jyn514/configparse","commit":"a2bab1a53279e0bcba90f1ccbcf93edf19928161"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.8,"checks":[{"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":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: pipCommand not pinned by hash: publish.sh:33","Info:   0 out of   1 pipCommand dependencies pinned"],"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":"Code-Review","score":0,"reason":"Found 0/26 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":"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":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"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":"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":"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":"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":"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"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 4 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-20T09:27:23.356Z","repository_id":53527397,"created_at":"2025-08-20T09:27:23.356Z","updated_at":"2025-08-20T09:27:23.356Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28416120,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T08:38:59.149Z","status":"ssl_error","status_checked_at":"2026-01-14T08:38:43.588Z","response_time":107,"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":["cli-library","configuration","parsing"],"created_at":"2026-01-14T09:35:44.412Z","updated_at":"2026-01-14T09:35:45.040Z","avatar_url":"https://github.com/jyn514.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# configparse\n\n[![Build Status](https://travis-ci.org/jyn514/py-autoconfig.svg?branch=master)](https://travis-ci.org/jyn514/py-autoconfig)\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n\n## Summary\n\nconfigparse is a drop-in-place replacement for python's `argparse` module\nwhich reads configuration files in addition to command line arguments.\n\n## Features\n\nIf the configuration directory exists, all of files in `\u003cconfig_directory\u003e/\u003cprog\u003e/` are read.\nAll files matching `~/.\u003cprog\u003e*` are read.\n\nFiles are treated according to their extension: `config.json` will be parsed as JSON,\n`myconf.yml` will be parsed as YAML.\n\nIf a file does not have an extension, it will be parsed according to the default\nfile format. This is preset to JSON, but can be changed by applications.\n\n\n### Configuration Directory\n\nOn Windows, the configuration directory looked up in `%AppData%`.\nOn any other OS, it is looked up from `$XDG_CONFIG_HOME`.\nIf the variable is not present (on any OS), files are read from `~/.config`.\n\n### Supported Formats\n\nThe following file formats are currently supported:\n\n- JSON (.json)\n- YAML (.yml)\n- INI  (.ini)\n- TOML (.toml)\n\nFeel free to submit a pull request adding more formats.\nSee CONTRIBUTING.md for an overview,\nif you already have a parser it should be very simple.\n\n## Using configparse\n\n### As a library\n\nIf you are an application developer who wants to use the library,\nthere is one entry point: the `ConfigParser` class,\nwhich is also aliased to `Parser` for convenience.\nYou can treat a `ConfigParser` instance exactly as you would an `ArgumentParser`\ninstance (as long as you pass `prog` to the constructor).\n\nNote that this means that `parse_args` will parse `sys.argv`\nin addition to parsing configuration files. If you don't want this behavior,\npass an empty list to `parse_args` like this: `args = parser.parse_args([])`.\n\nIf you want to change the default file format (e.g. for files named `~/.myprog`\nwithout an extension), use  `parser.set_default_ext(ext)`, where 'ext' is the\nfile extension for your format.\n\n#### Differences from `argparse`\n\nThe only API differences are as follows:\n\n- the name of the parser is `ConfigParser`, not `ArgumentParser`\n- the `prog` keyword is required for initializing `ConfigParser` (so that it knows where to look for configuration files)\n\nThat's it. Everything else is done automatically.\n\n#### Example\n\n```python\nfrom configparse import Parser\n\nparser = Parser(prog='myprogram')\nparser.add_argument('--short', '-s', help='use short format')\nargs = parser.parse_args()\n```\n\n### As an end user\n\nYou can put a configuration file in any of the following locations:\n\n- `~/.config/\u003cprog\u003e/`\n- `~/.\u003cprog\u003e*`\n\nSee `Features` for a full overview.\n\n#### Example\n\nAssume that the program `basic` takes the arguments '--short' and '--long'.\n\n```sh\n$ cat ~/.config/basic/config.yml\nshort: true\n$ basic\nYou chose the 'short' option.\n$ rm ~/.config/basic/config.yml\n$ echo 'long: true' \u003e ~/.basic.yml\n$ basic\nYou chose the 'long' option.\n```\n\n## Limitations\n\n- Only long options will be applied. If a short option is present in a config file,\nit will be treated as if it were a long option, i.e. not looked up.\nFor example, assuming some backend returns the dictionary `{'s': 'some value'}`:\n\n```\nfrom configparse import Parser\n\np = Parser(prog='myprog')\np.add_argument('-s', '--short')\nargs = p.parse_args()\nassert args.short is None\nassert args.s == 'some value'\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjyn514%2Fconfigparse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjyn514%2Fconfigparse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjyn514%2Fconfigparse/lists"}