{"id":34049209,"url":"https://github.com/darius/peglet","last_synced_at":"2026-04-09T04:04:47.878Z","repository":{"id":5432702,"uuid":"6625061","full_name":"darius/peglet","owner":"darius","description":"Robinson Crusoe's parsing library","archived":false,"fork":false,"pushed_at":"2016-06-23T15:07:38.000Z","size":129,"stargazers_count":37,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-15T18:05:36.508Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/darius.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES","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":"2012-11-10T06:35:31.000Z","updated_at":"2025-02-14T15:50:49.000Z","dependencies_parsed_at":"2022-07-06T18:24:30.223Z","dependency_job_id":null,"html_url":"https://github.com/darius/peglet","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/darius/peglet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darius%2Fpeglet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darius%2Fpeglet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darius%2Fpeglet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darius%2Fpeglet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/darius","download_url":"https://codeload.github.com/darius/peglet/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/darius%2Fpeglet/sbom","scorecard":{"id":322542,"data":{"date":"2025-08-11","repo":{"name":"github.com/darius/peglet","commit":"a3041ef069abc04e0e0d7404d38e259698912ea0"},"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":"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":"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":"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":"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":"Code-Review","score":0,"reason":"Found 0/30 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":"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":"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":"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":"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":"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":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: GNU General Public License v3.0: 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-18T01:44:01.881Z","repository_id":5432702,"created_at":"2025-08-18T01:44:01.881Z","updated_at":"2025-08-18T01:44:01.881Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31584828,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"online","status_checked_at":"2026-04-09T02:00:06.848Z","response_time":112,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":"2025-12-14T00:25:29.874Z","updated_at":"2026-04-09T04:04:47.872Z","avatar_url":"https://github.com/darius.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Peglet\n======\n\nPeglet extends Python's regular expressions to handle recursive\ngrammars. For example, to parse a tiny subset of HTML:\n\n\u003e\u003e\u003e from peglet import Parser\n\u003e\u003e\u003e a_little_html = Parser(r\"\"\"parts = part parts | \n...                            part  = \u003c(\\w+)\u003e parts \u003c/\\w+\u003e group\n...                                  | ([^\u003c]+)\n...                        \"\"\", group=lambda *values: values)\n\u003e\u003e\u003e a_little_html(\"Hello. \u003cp\u003e\u003cem\u003eNesting\u003c/em\u003e for \u003ci\u003ethe win\u003c/i\u003e.\u003c/p\u003e\")\n('Hello. ', ('p', ('em', 'Nesting'), ' for ', ('i', 'the win'), '.'))\n\nThe goal was to make a parsing library\n\n1. pleasant enough to use;\n\n2. simple to adapt or rewrite from scratch if I'm faced with some new\n   situation like a new programming language;\n\n3. with code easy enough to follow that it could introduce people to\n   parsing.\n\nSo it came down to one page of clear code not using combinators. (And\nthen ballooned to 200+ lines from documentation and a few extras.)\nSome bits that couldn't fit the latter two constraints went into a\ncombinator library, `parson \u003chttps://github.com/darius/parson\u003e`_.\n\nFor more, see `the examples\n\u003chttps://github.com/darius/peglet/tree/master/examples\u003e`_ or the\nmodule doc in `the code\n\u003chttps://github.com/darius/peglet/blob/master/peglet.py\u003e`_. Other\nprograms using this include `bicicleta.py\n\u003chttps://github.com/darius/bicicleta.py\u003e`_ and `.js\n\u003chttps://github.com/darius/bicicleta.js\u003e`_,\na `logic puzzle solver\n\u003chttps://github.com/darius/mccarthy-to-bryant/blob/master/puzzler.py\u003e`_,\nand the lexer for `unitcalc \u003chttps://github.com/darius/unitcalc\u003e`_.\n\n\nInstalling it\n=============\n\n``pip install peglet``, or else download then ``python setup.py install``.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarius%2Fpeglet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdarius%2Fpeglet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdarius%2Fpeglet/lists"}