Registry / data / openedx-calc

openedx-calc

JSON →
library5.0.0pypypiunverified

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.

pip install openedx-calc
INSTALL
IMPORT
SIG · OPENEDX-CALC
O
openedx-calc
datapythonv5.0.0
Install
10.2s avg
Import
Disk
229MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v3.1.2 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.000s · 304.2MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 10.2s · import 0.000s · 295MB
229MB installed
● package 229MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

calculator
from calc import calculator
from calc import calculator
CaselessLiteral
from calc import CaselessLiteral
DEFAULT_FUNCTIONS
from calc import DEFAULT_FUNCTIONS

Simple arithmetic evaluation using the calculator function.

from openedx_calc import calculator expr = "2 + 2" result = calculator(expr) print(result) # 4
Debug
Known issues
breakingPython 3.12+ only; drop of Python 3.8-3.11 support in version 5.0.0.
fix
Upgrade Python to 3.12 or later.
affects: 5.0.0
deprecatedThe 'evaluate' function was renamed to 'evaluator' in version 4.0.0.
fix
Use 'from openedx_calc import evaluator' instead of 'from openedx_calc import evaluate'.
affects: >=4.0.0 <5.0.0
gotchaThe calculator function expects a string, not a numeric type. Passing a number will cause an AttributeError.
fix
Always pass an expression as a string: calculator('2+2').
affects: all
Upgrade
Version history
5.0.0latest on PyPI · released Mar 13, 2026
Audit
Dependencies
sympyrequiredCore dependency for symbolic mathematics
numpyoptionalUsed for numerical calculations
Agent activity
20 hits · last 30 days
node
20
Resources
openedx-calc — pip install openedx-calc · libregistry