{"id":45369689,"url":"https://github.com/santalvarez/python-rule-engine","last_synced_at":"2026-02-21T15:24:18.133Z","repository":{"id":64974878,"uuid":"580097131","full_name":"santalvarez/python-rule-engine","owner":"santalvarez","description":"A rule engine where rules are defined in JSON format","archived":false,"fork":false,"pushed_at":"2025-06-07T19:38:35.000Z","size":73,"stargazers_count":51,"open_issues_count":2,"forks_count":6,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-17T16:54:03.060Z","etag":null,"topics":["json","python","rule-engine","rules","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":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/santalvarez.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-12-19T17:58:15.000Z","updated_at":"2025-08-14T23:22:02.000Z","dependencies_parsed_at":"2024-10-28T15:51:34.957Z","dependency_job_id":"25fde76a-9496-45ff-9bec-025d38b47a4e","html_url":"https://github.com/santalvarez/python-rule-engine","commit_stats":{"total_commits":44,"total_committers":1,"mean_commits":44.0,"dds":0.0,"last_synced_commit":"b9edc98383e5a25b0c1313ce41c7da3af094babe"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/santalvarez/python-rule-engine","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santalvarez%2Fpython-rule-engine","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santalvarez%2Fpython-rule-engine/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santalvarez%2Fpython-rule-engine/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santalvarez%2Fpython-rule-engine/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/santalvarez","download_url":"https://codeload.github.com/santalvarez/python-rule-engine/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/santalvarez%2Fpython-rule-engine/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29684421,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-21T14:31:22.911Z","status":"ssl_error","status_checked_at":"2026-02-21T14:31:22.570Z","response_time":107,"last_error":"SSL_read: 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":["json","python","rule-engine","rules","rules-engine"],"created_at":"2026-02-21T15:24:17.630Z","updated_at":"2026-02-21T15:24:18.128Z","avatar_url":"https://github.com/santalvarez.png","language":"Python","readme":"# python-rule-engine\n\n[![pypi](https://img.shields.io/pypi/v/python-rule-engine.svg)](https://pypi.python.org/pypi/python-rule-engine)\n[![versions](https://img.shields.io/pypi/pyversions/python-rule-engine.svg)](https://github.com/santalvarez/python-rule-engine)\n[![license](https://img.shields.io/github/license/pydantic/pydantic.svg)](https://github.com/pydantic/pydantic/blob/main/LICENSE)\n[![Downloads](https://pepy.tech/badge/python-rule-engine)](https://pepy.tech/project/python-rule-engine)\n[![Downloads Month](https://pepy.tech/badge/python-rule-engine/month)](https://pepy.tech/project/python-rule-engine)\n\n\n\nA rule engine where rules are defined in JSON format. The syntax of the rules belongs to the [json-rules-engine](https://github.com/CacheControl/json-rules-engine) javascript library though it contains some changes to make it more powerfull.\n\n- [Rule Syntax](docs/rules.md)\n- [Operators](docs/operators.md)\n\n## Installation\n```\npip install python-rule-engine\n```\n\n## Quick Example\n\n```python\nfrom python_rule_engine import RuleEngine\n\nrule = {\n    \"name\": \"basic_rule\",\n    \"conditions\": {\n        \"all\": [\n            {\n                # JSONPath support\n                \"path\": \"$.person.name\",\n                \"operator\": \"equal\",\n                \"value\": \"Lionel\"\n            },\n            {\n                \"path\": \"$.person.last_name\",\n                \"operator\": \"equal\",\n                \"value\": \"Messi\"\n            }\n        ]\n    }\n}\n\nobj = {\n    \"person\": {\n        \"name\": \"Lionel\",\n        \"last_name\": \"Messi\"\n    }\n}\n\nengine = RuleEngine([rule])\n\nresults = engine.evaluate(obj)\n\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantalvarez%2Fpython-rule-engine","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsantalvarez%2Fpython-rule-engine","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsantalvarez%2Fpython-rule-engine/lists"}