{"id":21648,"library":"openedx-calc","title":"Open edX Calc","description":"A helper library for mathematical calculations and symbolic mathematics, used by Open edX. Current version 5.0.0, requires Python >=3.12. Release cadence is irregular, tied to Open edX releases.","status":"active","version":"5.0.0","language":"python","source_language":"en","source_url":"https://github.com/openedx/openedx-calc","tags":["openedx","math","symbolic","calculator","education"],"install":[{"cmd":"pip install openedx-calc","lang":"bash","label":"Latest stable"}],"dependencies":[{"reason":"Core dependency for symbolic mathematics","package":"sympy","optional":false},{"reason":"Used for numerical calculations","package":"numpy","optional":true}],"imports":[{"wrong":"from calc import calculator","symbol":"calculator","correct":"from calc import calculator"},{"symbol":"CaselessLiteral","correct":"from calc import CaselessLiteral"},{"symbol":"DEFAULT_FUNCTIONS","correct":"from calc import DEFAULT_FUNCTIONS"}],"quickstart":{"code":"from openedx_calc import calculator\nexpr = \"2 + 2\"\nresult = calculator(expr)\nprint(result)  # 4","lang":"python","description":"Simple arithmetic evaluation using the calculator function."},"warnings":[{"fix":"Upgrade Python to 3.12 or later.","message":"Python 3.12+ only; drop of Python 3.8-3.11 support in version 5.0.0.","severity":"breaking","affected_versions":"5.0.0"},{"fix":"Use 'from openedx_calc import evaluator' instead of 'from openedx_calc import evaluate'.","message":"The 'evaluate' function was renamed to 'evaluator' in version 4.0.0.","severity":"deprecated","affected_versions":">=4.0.0 <5.0.0"},{"fix":"Always pass an expression as a string: calculator('2+2').","message":"The calculator function expects a string, not a numeric type. Passing a number will cause an AttributeError.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'3.12':22 '5.0.0':19 'cadenc':24 'calc':3 'calcul':9,35 'current':17 'educ':36 'edx':2,16,30 'helper':5 'irregular':26 'librari':6 'math':33 'mathemat':8,12 'open':1,15,29 'openedx':32 'python':21 'releas':23,31 'requir':20 'symbol':11,34 'tie':27 'use':13 'version':18","created_at":"2026-04-27T17:01:00.654450+00:00","updated_at":"2026-04-27T17:01:00.654450+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'calculator' from 'calc' (/tmp/tmpq8k1zc8i/venv/lib/python3.12/site-packages/calc/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"5.0.0","cli_name":"","cli_version":null,"type":"library","homepage":"https://openedx.org","github":"https://github.com/openedx/openedx-calc","docs":null,"changelog":null,"pypi":"https://pypi.org/project/openedx-calc/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["data"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}