Skip to content

This project implements a three-tier rule engine application designed to determine user eligibility based on various attributes such as age, department, income, and spend. The system dynamically creates, combines, and evaluates rules using an AST to represent conditional logic. It enables flexibility in rule creation and modification.

Notifications You must be signed in to change notification settings

student-rubeena/Rule-engine-with-AST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 

Repository files navigation

1.Project Title Rule Engine with AST

  1. Description The Rule Engine with AST is a flexible and dynamic system for creating, combining, and evaluating rules based on user attributes such as age, department, and salary. Utilizing an Abstract Syntax Tree (AST), the project efficiently processes complex conditions and adapts to changing business requirement

  2. Table of Contents

  1. Features
  • Dynamic rule creation and modification
  • Efficient evaluation of combined rules
  • Error handling and attribute validation
  • Persistent storage in a database
  1. Installation bash git clone https://github.com/yourusername/rule-engine-with-ast.git cd rule-engine-with-ast pip install -r requirements.txt

  2. Usage

Create a Rule

POST /api/rules { "rule": "age > 30 AND department = 'Sales'" }

Evaluate a Rule

POST /api/evaluate { "data": { "age": 35, "department": "Sales", "salary": 60000, "experience": 3 } }

  1. Testing

To run tests, use:

pytest tests/

  1. Contributing

If you would like to contribute, please fork the repository and submit a pull request.

  1. License

This project is licensed under the MIT License.

  1. Acknowledgments

Special thanks to [any libraries or resources] that assisted in the development of this project

  1. Contact Information

Rubeena Maddarki 9448236090 rubeenamaddarki85@gmail.com

About

This project implements a three-tier rule engine application designed to determine user eligibility based on various attributes such as age, department, income, and spend. The system dynamically creates, combines, and evaluates rules using an AST to represent conditional logic. It enables flexibility in rule creation and modification.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published