{"id":34060597,"url":"https://github.com/petrilli/pyrules","last_synced_at":"2026-04-11T05:01:30.229Z","repository":{"id":21166787,"uuid":"91863902","full_name":"petrilli/pyrules","owner":"petrilli","description":"Simplistic rules engine vaguely inspired by OPS5","archived":false,"fork":false,"pushed_at":"2022-12-26T20:28:08.000Z","size":40,"stargazers_count":2,"open_issues_count":13,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-12-16T00:40:51.804Z","etag":null,"topics":["ops5","python","rules-engine"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/petrilli.png","metadata":{"files":{"readme":"README.rst","changelog":"HISTORY.rst","contributing":"CONTRIBUTING.rst","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-05-20T03:59:53.000Z","updated_at":"2019-07-28T07:10:17.000Z","dependencies_parsed_at":"2022-09-04T07:50:36.214Z","dependency_job_id":null,"html_url":"https://github.com/petrilli/pyrules","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/petrilli/pyrules","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrilli%2Fpyrules","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrilli%2Fpyrules/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrilli%2Fpyrules/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrilli%2Fpyrules/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/petrilli","download_url":"https://codeload.github.com/petrilli/pyrules/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/petrilli%2Fpyrules/sbom","scorecard":{"id":729529,"data":{"date":"2025-08-11","repo":{"name":"github.com/petrilli/pyrules","commit":"c41e1a8b91a20bf28ba410ba9ffeb225b8092fd6"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.9,"checks":[{"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":"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":"Code-Review","score":3,"reason":"Found 7/19 approved changesets -- score normalized to 3","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":"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":"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":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"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"}},{"name":"Vulnerabilities","score":6,"reason":"4 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2021-437 / GHSA-5xp3-jfq3-5q8x","Warn: Project is vulnerable to: PYSEC-2020-173 / GHSA-gpvv-69j7-gwj8","Warn: Project is vulnerable to: PYSEC-2023-228 / GHSA-mq26-g339-26xf","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 18 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-22T13:59:34.726Z","repository_id":21166787,"created_at":"2025-08-22T13:59:34.726Z","updated_at":"2025-08-22T13:59:34.726Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31669117,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-10T17:19:37.612Z","status":"online","status_checked_at":"2026-04-11T02:00:05.776Z","response_time":54,"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":["ops5","python","rules-engine"],"created_at":"2025-12-14T04:11:10.337Z","updated_at":"2026-04-11T05:01:30.214Z","avatar_url":"https://github.com/petrilli.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"=======\npyrules\n=======\n\n\n.. image:: https://img.shields.io/pypi/v/pyrules.svg\n        :target: https://pypi.python.org/pypi/pyrules\n\n.. image:: https://img.shields.io/travis/petrilli/pyrules.svg\n        :target: https://travis-ci.org/petrilli/pyrules\n\n.. image:: https://pyup.io/repos/github/petrilli/pyrules/shield.svg\n     :target: https://pyup.io/repos/github/petrilli/pyrules/\n     :alt: Updates\n\n\nA Python rules engine inspired by OPS5, because sometimes you just want to have a basic rule system that you can run against data, and you don't want to have to deal with the crazy of CLIPS.\nThis will never be designed for dealing with thousands of rules against hundreds of thousands of facts.\nWhat it does, hopefully, is allow you to abstract out the design of rules, and not worry so much about the flow.\n\nThe system uses a basic model of rule engine execution, rather than the more advanced Rete_ model.\nIt uses a simple conflict resolution model, and opportunistic matching by the rules, with a combination of refraction, arbitrary choice, and declarative ordering.\n\n\n* Free software: BSD license\n\n\nFeatures\n--------\n\n* Uses a simple recognize-act cycle.\n\n\nRecognize-Act Cycle\n-------------------\n\nThe recognize-act cycle is the pattern-matching procedure that takes place repeatedly as a ruleset program executes.\nThe design is based on the idea that once working memory is populated, the rules are run until none match any more, or an iteration limit is reached.\nThe cycle consists of the following steps:\n\n1. Match: Iterate through each rule, allowing it to search working memory and decide if it has something to offer.\n   This places all instantiations in a list called the conflict set.\n2. Select: Using an ordered sequence of criteria, specifically combining refraction, declarative ordering, and optional arbitrary choice, take the instantiation with the highest priority out of the conflict set.\n   If the conflict set is empty (because no rule condition has been satisfied), the cycle stops.\n3. Act: Execute the actions of the rule in the selected working memory.\n\n\nInstallation\n------------\n\nTODO\n\n\nUsage\n-----\n\nTODO\n\n\nCredits\n-------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n.. _Rete: https://en.wikipedia.org/wiki/Rete_algorithm\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrilli%2Fpyrules","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpetrilli%2Fpyrules","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpetrilli%2Fpyrules/lists"}