{"library":"mathruler","title":"MathRuler","description":"MathRuler is a powerful and versatile Python library, currently at version 0.1.0, designed to simplify and enhance mathematical calculations. It aims to provide tools for handling equations, units, and general computations, leveraging symbolic and numerical backends. As an early-stage library, its API is subject to iterative improvements with a rapid release cadence.","language":"python","status":"active","last_verified":"Fri Apr 17","install":{"commands":["pip install mathruler"],"cli":null},"imports":["from mathruler import MathRuler"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"from mathruler import MathRuler\n\n# Initialize the MathRuler\nruler = MathRuler()\n\n# Solve a simple algebraic equation\nresult_equation = ruler.equation(\"2x + 5 = 10\")\nprint(f\"Equation result: {result_equation.solve_for('x')}\")\n\n# Perform a calculation with units (if supported in future versions, currently basic)\n# Note: Unit support is an evolving feature and may require specific syntax.\n# For 0.1.0, focus on basic equations.\n# Example: Evaluate an expression\nresult_eval = ruler.evaluate(\"5 * (3 + 2)\")\nprint(f\"Evaluation result: {result_eval}\")\n\n# Define and use a variable\nruler.set_variable('y', 15)\nresult_var = ruler.evaluate(\"y / 3\")\nprint(f\"Variable calculation result: {result_var}\")","lang":"python","description":"Initializes a MathRuler instance and demonstrates solving a simple equation, evaluating an expression, and using variables. The `.equation()` method returns an equation object that can be further manipulated, for example, to solve for a specific variable. The `.evaluate()` method directly computes an expression.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}