{"id":15297420,"url":"https://github.com/tailsdotcom/boolrule","last_synced_at":"2025-04-13T22:41:39.801Z","repository":{"id":11437809,"uuid":"69678266","full_name":"tailsdotcom/boolrule","owner":"tailsdotcom","description":"Simple boolean expression evaluation engine for python.","archived":false,"fork":false,"pushed_at":"2023-05-11T13:19:54.000Z","size":136,"stargazers_count":17,"open_issues_count":10,"forks_count":4,"subscribers_count":17,"default_branch":"main","last_synced_at":"2025-03-27T13:01:40.452Z","etag":null,"topics":["pyparsing","python2","python3"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/boolrule/","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/tailsdotcom.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":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":"AUTHORS.rst","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-30T15:25:15.000Z","updated_at":"2025-03-04T10:19:45.000Z","dependencies_parsed_at":"2024-10-15T03:21:51.419Z","dependency_job_id":"49541099-27fe-4e80-971e-4592279cf9f7","html_url":"https://github.com/tailsdotcom/boolrule","commit_stats":{"total_commits":176,"total_committers":9,"mean_commits":"19.555555555555557","dds":0.6931818181818181,"last_synced_commit":"a1671fc372039cfcf4d09673e575ffe69c1a4679"},"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailsdotcom%2Fboolrule","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailsdotcom%2Fboolrule/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailsdotcom%2Fboolrule/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tailsdotcom%2Fboolrule/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tailsdotcom","download_url":"https://codeload.github.com/tailsdotcom/boolrule/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248794503,"owners_count":21162613,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["pyparsing","python2","python3"],"created_at":"2024-09-30T19:17:25.054Z","updated_at":"2025-04-13T22:41:39.764Z","avatar_url":"https://github.com/tailsdotcom.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"========\nboolrule\n========\n\n.. image:: https://img.shields.io/pypi/v/boolrule.svg\n        :target: https://pypi.python.org/pypi/boolrule\n\n.. image:: https://github.com/tailsdotcom/boolrule/actions/workflows/ci.yml/badge.svg\n        :target: https://github.com/tailsdotcom/boolrule/actions/workflows/ci.yml\n\n.. image:: https://readthedocs.org/projects/boolrule/badge/?version=latest\n        :target: https://boolrule.readthedocs.io/en/latest/?badge=latest\n\nSimple boolean expression evaluation engine.\n\n* Free software: MIT license\n* Documentation: https://boolrule.readthedocs.io.\n\n\nFeatures\n========\n\nCompare simple boolean statements::\n\n \u003e\u003e\u003e rule = BoolRule('5 \u003e 3')\n \u003e\u003e\u003e rule.test()\n True\n \u003e\u003e\u003e rule = BoolRule('5 \u003c 3')\n \u003e\u003e\u003e rule.test()\n False\n\n\nEvaluate boolean statements against a context dict::\n\n \u003e\u003e\u003e can_buy_beer = BoolRule('user.age_years \u003e= 18')\n \u003e\u003e\u003e can_buy_beer.test({'user':{'age_years': 12}})\n False\n \u003e\u003e\u003e can_buy_beer.test({'user':{'age_years': 20}})\n True\n\nCombine conditions with and and or operators to produce complex expressions::\n\n \u003e\u003e\u003e is_hipster = BoolRule('address.postcode.outcode in (\"E1\",\"E2\") or user.has_beard = true')\n \u003e\u003e\u003e address = {\n \u003e\u003e\u003e   'postcode': {\n \u003e\u003e\u003e      'outcode': 'E1'\n \u003e\u003e\u003e   }\n \u003e\u003e\u003e }\n \u003e\u003e\u003e is_hipster.test({'has_beard': False, 'address': address})\n True\n\n\nCredits\n=======\n\nMade possible by the excellent pyparsing_ library.\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _pyparsing: http://pyparsing.wikispaces.com/\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailsdotcom%2Fboolrule","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftailsdotcom%2Fboolrule","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftailsdotcom%2Fboolrule/lists"}