Simple library for evaluating mathematical formulas.
Project description
formparse
Simple library for evaluating mathematical formulas.
Written as an safe alternative to Pythons eval() function the aim was to provide a lightweight library that could evaluate mathematical formulas provided by users in a safe way.
Installation
You can install this package unsing pip:
pip install formparse
SECURITY WARNING!
Usage
from formparse import Formula
formula = Formula('3*x**2')
result = formula.eval({'x': 2})
Note
This project has been set up using PyScaffold 4.3.1. For details and usage information on PyScaffold see https://pyscaffold.org/.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
formparse-0.0.1.tar.gz
(18.1 kB
view hashes)
Built Distribution
Close
Hashes for formparse-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc58267aaf4800758f80fb5d806ade67c8f31c2749f8b859c197bddcfaf25be6 |
|
MD5 | c4214e3624b5b348f3c67afb887fea0e |
|
BLAKE2b-256 | fd82aa9c68a72975562cd08016d79849698ad2f1557ad61a60762c6916efbe6a |