
Product
Introducing Socket Firewall Enterprise: Flexible, Configurable Protection for Modern Package Ecosystems
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.
The mathparse library is a Python module designed to evaluate mathematical equations contained in strings.
Here are a few examples:
from mathparse import mathparse
mathparse.parse('50 * (85 / 100)')
>>> 42.5
mathparse.parse('one hundred times fifty four', language='ENG')
>>> 5400
mathparse.parse('(seven * nine) + 8 - (45 plus two)', language='ENG')
>>> 24
Mathparse does not employ the use of Python's eval function when evaluating provided mathematical expressions. This is a measure to prevent arbitrary code execution vulnerabilities. See https://mathparse.chatterbot.us/postfix/ for additional details.
Mathparse is a standalone Python package and requires zero dependencies to function.
The language parameter must be set in order to evaluate an equation that uses word operators. The language code should be a valid ISO 639-2 language code.
pip install mathparse
See the full documentation at https://mathparse.chatterbot.us
See release notes for changes.
FAQs
mathparse is a library for solving mathematical equations contained in strings
We found that mathparse demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket Firewall Enterprise is now available with flexible deployment, configurable policies, and expanded language support.

Security News
Open source dashboard CNAPulse tracks CVE Numbering Authorities’ publishing activity, highlighting trends and transparency across the CVE ecosystem.

Product
Detect malware, unsafe data flows, and license issues in GitHub Actions with Socket’s new workflow scanning support.