{ "info": { "author": "Ivan Ergunov", "author_email": "hozblok@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "License :: OSI Approved :: Apache Software License", "Operating System :: OS Independent", "Programming Language :: C++", "Programming Language :: Python", "Topic :: Scientific/Engineering :: Mathematics", "Topic :: Scientific/Engineering :: Physics" ], "description": "# formula - Arbitrary-precision formula parser and solver\n\n[![PyPI](https://img.shields.io/pypi/v/formula.svg)](https://pypi.org/project/formula/)\n\n## Development status\n\nStatus: **Production/Stable**\n\nDevelopment plan:\n\n+ Complex numbers support. (Character `i` are reserved for this by default.)\n\nThis project built with [pybind11](https://github.com/pybind/pybind11).\n\n## Installation\n\n### On Unix (Linux, OS X)\n\n+ `pip install formula`\n\n### On Windows (Requires Visual Studio 2015)\n\n+ For Python 3.5+:\n + clone this repository\n + `pip install ./formula`\n+ For earlier versions of Python, including Python 2.7:\n\n Pybind11 requires a C++11 compliant compiler (i.e. Visual Studio 2015 on\n Windows). Running a regular `pip install` command will detect the version\n of the compiler used to build Python and attempt to build the extension\n with it. We must force the use of Visual Studio 2015.\n\n + clone this repository\n + `\"%VS140COMNTOOLS%\\..\\..\\VC\\vcvarsall.bat\" x64`\n + `set DISTUTILS_USE_SDK=1`\n + `set MSSdk=1`\n + `pip install ./formula`\n\n Note that this requires the user building `formula` to have registry edition\n rights on the machine, to be able to run the `vcvarsall.bat` script.\n\n## Windows runtime requirements\n\nOn Windows, the Visual C++ 2015 redistributable packages are a runtime\nrequirement for this project. It can be found [here](https://www.microsoft.com/en-us/download/details.aspx?id=48145).\n\nIf you use the Anaconda python distribution, you may require the Visual Studio\nruntime as a platform-dependent runtime requirement for you package:\n\n```yaml\nrequirements:\n build:\n - python\n - setuptools\n - pybind11\n\n run:\n - python\n - vs2015_runtime # [win]\n```\n\n## Documentation\n\n**formula** contains case sensitive (by default) string parser.\nLet's imagine that we have a string expression, e.g. `\"(x^2+y)/sin(a*z)\"`.\nWe want to calculate the value of this function in the following point:\n\n```text\nx=0.001, y=0.0000000000000000000000555, z=-2, a=-1,\n```\n\nSo we pass the expression to the `formula` constructor.\n\n```python\nfrom formula import Formula\nf5a = Formula(\"(x^2+y)/sin(a*z)\")\n```\n\nAnd it is enough to call the `get(...)` method or the `get_derivative(...)` to calculate\nthe value of the expression or the derivative of the expression at this point.\n\n```python\nvariables = {\n \"x\": \"0.001\",\n \"y\": \"0.0000000000000000000000555\",\n \"z\": \"-2\",\n \"a\": \"-1\",\n}\nvalue = f5a.get(variables)\nx_derivative = f5a.get_derivative(\"x\", variables)\nz_derivative = f5a.get_derivative(\"z\", variables)\n```\n\n## License\n\n**formula** is provided under Apache license that can be found in the LICENSE\nfile. By using, distributing, or contributing to this project, you agree to the\nterms and conditions of this license.\n\n## Test call\n\n```python\nfrom formula import Formula\npi = Formula(\"2*asin(x)\", 64).get({\"x\": \"1\"})\n```\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/hozblok/formula", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "formula", "package_url": "https://pypi.org/project/formula/", "platform": "", "project_url": "https://pypi.org/project/formula/", "project_urls": { "Homepage": "https://github.com/hozblok/formula" }, "release_url": "https://pypi.org/project/formula/1.0.2/", "requires_dist": [ "pybind11 (>=2.2)" ], "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "summary": "Arbitrary-precision formula parser and solver.", "version": "1.0.2" }, "last_serial": 5453919, "releases": { "1.0.0a0": [ { "comment_text": "", "digests": { "md5": "f9be1f17a75e177966a4a8e77dc9ccbf", "sha256": "a5158eebfcb772bc6bb6bfc37bf336a94a0c59eb314def0564bbc259d821936a" }, "downloads": -1, "filename": "formula-1.0.0a0.tar.gz", "has_sig": false, "md5_digest": "f9be1f17a75e177966a4a8e77dc9ccbf", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12377, "upload_time": "2019-02-20T21:24:00", "url": "https://files.pythonhosted.org/packages/79/2a/23b5226b41d42a1c86a98965c65fb4e942bc8aaa6453fb34eb93dfad58dd/formula-1.0.0a0.tar.gz" } ], "1.0.0a1": [ { "comment_text": "", "digests": { "md5": "38f77ee028fea824298f05f29175a0fb", "sha256": "8f7056b75bfa9343598a6626c5746efb708cce3f70638b3965f5cda76b6077d7" }, "downloads": -1, "filename": "formula-1.0.0a1.tar.gz", "has_sig": false, "md5_digest": "38f77ee028fea824298f05f29175a0fb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12386, "upload_time": "2019-02-20T21:27:35", "url": "https://files.pythonhosted.org/packages/80/82/353d9699353a81d6d129cd6ce600d3d8ad6abf56b2a408288a679694974c/formula-1.0.0a1.tar.gz" } ], "1.0.0a3": [ { "comment_text": "", "digests": { "md5": "2aca1f5891019d01a99b1f633f1dc7a1", "sha256": "6d05ad5f47da8ae440faed7ae84b53a4dff729f7955e11bb294144271fca48f9" }, "downloads": -1, "filename": "formula-1.0.0a3.tar.gz", "has_sig": false, "md5_digest": "2aca1f5891019d01a99b1f633f1dc7a1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8754, "upload_time": "2019-03-11T21:23:07", "url": "https://files.pythonhosted.org/packages/94/06/f04ce820fc2922662efecc9a5c35860455635ecad0e7c930bc333198fd52/formula-1.0.0a3.tar.gz" } ], "1.0.0a4": [ { "comment_text": "", "digests": { "md5": "8e5735bd997181151e71f241209b5056", "sha256": "d20e899bb4313e0838d4a68ee56b83f856d6f133ce6d3daa57ac884fe04082dd" }, "downloads": -1, "filename": "formula-1.0.0a4.tar.gz", "has_sig": false, "md5_digest": "8e5735bd997181151e71f241209b5056", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12437228, "upload_time": "2019-03-11T22:24:15", "url": "https://files.pythonhosted.org/packages/24/3e/c4b413588d96d5ba5f76bfe5970d9dfd23c38b1c16f347714d2aa3f9fc42/formula-1.0.0a4.tar.gz" } ], "1.0.0a5": [ { "comment_text": "", "digests": { "md5": "d4048a406eaca9509d951246f1b79aef", "sha256": "b1cec6f65823baad3eceab6ae1e221ceb756ca922adbc28a98e11390e4e6b282" }, "downloads": -1, "filename": "formula-1.0.0a5.tar.gz", "has_sig": false, "md5_digest": "d4048a406eaca9509d951246f1b79aef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12440168, "upload_time": "2019-03-14T21:17:56", "url": "https://files.pythonhosted.org/packages/74/14/d08a31834fa3462deec3d1bbb8487a1dabae1de16847e5138f77e331b5e8/formula-1.0.0a5.tar.gz" } ], "1.0.0a6": [ { "comment_text": "", "digests": { "md5": "d27c076f416c7e334978647157e2c43a", "sha256": "b10a6bde08ae1475df2ca23b09ebe1a14d2f89753870af7193a8ccd22d38e548" }, "downloads": -1, "filename": "formula-1.0.0a6.tar.gz", "has_sig": false, "md5_digest": "d27c076f416c7e334978647157e2c43a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12439714, "upload_time": "2019-03-16T19:46:17", "url": "https://files.pythonhosted.org/packages/49/a4/228a50a3a2d23b16a09882802c5bb165ead9b03827a8c169078dbafaa5b9/formula-1.0.0a6.tar.gz" } ], "1.0.0a7": [ { "comment_text": "", "digests": { "md5": "f8dc1335cc98542fb37bf657ac548644", "sha256": "99a3db7df9225614cfc46cf90257a34b39978e83a3791d81eb17c37c8b482c9c" }, "downloads": -1, "filename": "formula-1.0.0b0-cp37-cp37m-win32.whl", "has_sig": false, "md5_digest": "f8dc1335cc98542fb37bf657ac548644", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 557856, "upload_time": "2019-04-10T13:00:44", "url": "https://files.pythonhosted.org/packages/48/94/3130921bdf5e63cec14cc8394d51dbe67031e5141a5c987cad1676760bc6/formula-1.0.0b0-cp37-cp37m-win32.whl" } ], "1.0.0b0": [ { "comment_text": "", "digests": { "md5": "af97f2699d8110c94cfbaf8f8c9a725d", "sha256": "c3948ac13fc58189ad72648ce722000c768785d7d8628aa7e41eb47c89a26961" }, "downloads": -1, "filename": "formula-1.0.0b0-cp36-cp36m-win_amd64.whl", "has_sig": false, "md5_digest": "af97f2699d8110c94cfbaf8f8c9a725d", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 596514, "upload_time": "2019-04-29T20:30:06", "url": "https://files.pythonhosted.org/packages/dd/4f/baf5aa75e6d36e7a62b1305ef6a653ae1165d30aa401f50e0fc19d16506b/formula-1.0.0b0-cp36-cp36m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "07ddaf613bc92dcd41dae03e4332a472", "sha256": "2209c869a5bc89dff73263b9327fb29dce94be4c7bb1e2a2d05cc8b96d42d60e" }, "downloads": -1, "filename": "formula-1.0.0b0-py3.7-win32.egg", "has_sig": false, "md5_digest": "07ddaf613bc92dcd41dae03e4332a472", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 705863, "upload_time": "2019-04-30T21:52:32", "url": "https://files.pythonhosted.org/packages/b8/9d/30ba20d51ccac1267501e5186bd09f7f9e21637eb605b361d2490c2eafbf/formula-1.0.0b0-py3.7-win32.egg" }, { "comment_text": "", "digests": { "md5": "15fa63f60a60fe1b8ccbeb9326d61729", "sha256": "aa4f96b139bc9a01e09d18f2ce86d7ff478a664864dc856f0b87d17912e7c3c2" }, "downloads": -1, "filename": "formula-1.0.0b0.tar.gz", "has_sig": false, "md5_digest": "15fa63f60a60fe1b8ccbeb9326d61729", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 24363455, "upload_time": "2019-04-10T13:01:23", "url": "https://files.pythonhosted.org/packages/db/55/d5084937a0daec78dbf9ff4a3046257202aa640f20ba0c5498c6378e5341/formula-1.0.0b0.tar.gz" } ], "1.0.0b3": [ { "comment_text": "", "digests": { "md5": "69941559b8015a6dc5cb14d8f8ef32ce", "sha256": "96c04bf6c137c6adc7c680b20a562c066d8b70aeb0ec6e468cb8b6d217f1e5bb" }, "downloads": -1, "filename": "formula-1.0.0b3-cp36-cp36m-win_amd64.whl", "has_sig": false, "md5_digest": "69941559b8015a6dc5cb14d8f8ef32ce", "packagetype": "bdist_wheel", "python_version": "cp36", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 815200, "upload_time": "2019-05-12T21:56:18", "url": "https://files.pythonhosted.org/packages/ee/fe/b925e02c0599973a845ff36996724c1ca55e1656de615aa50c0c1ec01309/formula-1.0.0b3-cp36-cp36m-win_amd64.whl" }, { "comment_text": "", "digests": { "md5": "14a0caabedd3076a3cabb74b1bb8ab6f", "sha256": "f66c52a2298777cee8253d74db2e350b6d293371fba25e9dbd52bd445564f3e4" }, "downloads": -1, "filename": "formula-1.0.0b3-cp37-cp37m-win32.whl", "has_sig": false, "md5_digest": "14a0caabedd3076a3cabb74b1bb8ab6f", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 726763, "upload_time": "2019-05-12T21:46:31", "url": "https://files.pythonhosted.org/packages/78/47/a42b9e94b503c34cd9f1df5d6bcfce661a37e4ce0cfcfc877988f44417d3/formula-1.0.0b3-cp37-cp37m-win32.whl" }, { "comment_text": "", "digests": { "md5": "43ce1b773553be5428907d10fd3e2250", "sha256": "c5984043912c07d1c8f39ba2b0b19df868f03629496b4eb1307a50e46397646e" }, "downloads": -1, "filename": "formula-1.0.0b3-py3.6-win-amd64.egg", "has_sig": false, "md5_digest": "43ce1b773553be5428907d10fd3e2250", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 968687, "upload_time": "2019-05-12T21:56:04", "url": "https://files.pythonhosted.org/packages/0d/81/c54a60c4d062e7d322b584b7ff3dd312ddf3a01dda0d4662bbd6178cd26a/formula-1.0.0b3-py3.6-win-amd64.egg" }, { "comment_text": "", "digests": { "md5": "621fb4f7d87937bea6dadaefe30f65c4", "sha256": "19b0f920f80c60c5a128eada2c3351940aecfe5889efdd3e6cccaac38c394f6c" }, "downloads": -1, "filename": "formula-1.0.0b3-py3.7-win32.egg", "has_sig": false, "md5_digest": "621fb4f7d87937bea6dadaefe30f65c4", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 880252, "upload_time": "2019-05-12T21:46:34", "url": "https://files.pythonhosted.org/packages/56/1b/7e584fd64451131dd3567a08426c7858ed61787e74ce2d44a9d164780106/formula-1.0.0b3-py3.7-win32.egg" }, { "comment_text": "", "digests": { "md5": "d3662b7c42d8a60e398cc7909a144049", "sha256": "c879616696c832126da4865d424f0ac638eb3498c4bdf8749dcc1d507f1dbdc0" }, "downloads": -1, "filename": "formula-1.0.0b3.tar.gz", "has_sig": false, "md5_digest": "d3662b7c42d8a60e398cc7909a144049", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 24365125, "upload_time": "2019-05-12T21:47:00", "url": "https://files.pythonhosted.org/packages/0e/c8/00070bebece2169a3b97e84dbe4e69f6953dbf34d506c565c9315af41b43/formula-1.0.0b3.tar.gz" } ], "1.0.0b4": [ { "comment_text": "", "digests": { "md5": "da76d6537d3356d5002c6764eccd7fc5", "sha256": "6db453d2ebc61a998ce6132c4dc55d0a8208410a3bfe4757c4513a898d398491" }, "downloads": -1, "filename": "formula-1.0.0b4-cp37-cp37m-win32.whl", "has_sig": false, "md5_digest": "da76d6537d3356d5002c6764eccd7fc5", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 721746, "upload_time": "2019-05-13T22:14:18", "url": "https://files.pythonhosted.org/packages/4e/25/8ef73c75a9479c0af8f083526177d322935290b39267dffca3153164c591/formula-1.0.0b4-cp37-cp37m-win32.whl" }, { "comment_text": "", "digests": { "md5": "343e1cd66a074a1a27ae126e3dd29919", "sha256": "5db56860045bf0b6f6acc661eaf13b7ca369cfe38db8fd13ad6dc7d8bfee3f38" }, "downloads": -1, "filename": "formula-1.0.0b4-py3.7-win32.egg", "has_sig": false, "md5_digest": "343e1cd66a074a1a27ae126e3dd29919", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 875149, "upload_time": "2019-05-13T22:14:21", "url": "https://files.pythonhosted.org/packages/92/27/57b400f7e963e3566fbe19f5c014572326aa843ba7fa646c1daf00440aa2/formula-1.0.0b4-py3.7-win32.egg" }, { "comment_text": "", "digests": { "md5": "5cb4868e027e3b6d0605cb45bfb05873", "sha256": "3a4ceb0b0bcf4579d1e416a39318259995e76c195ca18475b1b95f0cabb0c2e5" }, "downloads": -1, "filename": "formula-1.0.0b4.tar.gz", "has_sig": false, "md5_digest": "5cb4868e027e3b6d0605cb45bfb05873", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4", "size": 24366788, "upload_time": "2019-05-13T22:14:43", "url": "https://files.pythonhosted.org/packages/d9/22/e0192a8d962eb65222eaea9bbd97f760708dfa4ac4f634d0fdeea0d64067/formula-1.0.0b4.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "3de73ad80944849b3769a9f3d007ca76", "sha256": "c75e8e45f5abc648aea1dec013761f86e6c4617d656df84fca4d20fe65d0002f" }, "downloads": -1, "filename": "formula-1.0.2-cp37-cp37m-win32.whl", "has_sig": false, "md5_digest": "3de73ad80944849b3769a9f3d007ca76", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 840892, "upload_time": "2019-06-26T21:27:28", "url": "https://files.pythonhosted.org/packages/3c/10/e77aa70f94afb4034cd2743d2002cb4ac2ef499811c6ef9677bddf9279a8/formula-1.0.2-cp37-cp37m-win32.whl" }, { "comment_text": "", "digests": { "md5": "6ed2f63ea7c221b6dcfaebec8deb289e", "sha256": "e0271f3cec613ad53c88ea363c88c15f3dfb73ee5381c08c22e285c073ed1459" }, "downloads": -1, "filename": "formula-1.0.2-py3.7-win32.egg", "has_sig": false, "md5_digest": "6ed2f63ea7c221b6dcfaebec8deb289e", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 994280, "upload_time": "2019-06-26T21:27:30", "url": "https://files.pythonhosted.org/packages/7b/fe/9bca3ed15c5ac12d34b9b9698c303a2ccbf1f109d6d6ef7945339c287024/formula-1.0.2-py3.7-win32.egg" }, { "comment_text": "", "digests": { "md5": "9302fa7a7a1ad3ff7ad0f48fe0e85bd6", "sha256": "7c12af30fd25db93f3f301b57d7e64fc0599a727ce77c2dcc82d9956a993b98d" }, "downloads": -1, "filename": "formula-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9302fa7a7a1ad3ff7ad0f48fe0e85bd6", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 24365973, "upload_time": "2019-06-26T21:27:44", "url": "https://files.pythonhosted.org/packages/24/47/319dc719c19d6882038d68b7e07b79a985a172a5543c8012f483067e0f93/formula-1.0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "3de73ad80944849b3769a9f3d007ca76", "sha256": "c75e8e45f5abc648aea1dec013761f86e6c4617d656df84fca4d20fe65d0002f" }, "downloads": -1, "filename": "formula-1.0.2-cp37-cp37m-win32.whl", "has_sig": false, "md5_digest": "3de73ad80944849b3769a9f3d007ca76", "packagetype": "bdist_wheel", "python_version": "cp37", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 840892, "upload_time": "2019-06-26T21:27:28", "url": "https://files.pythonhosted.org/packages/3c/10/e77aa70f94afb4034cd2743d2002cb4ac2ef499811c6ef9677bddf9279a8/formula-1.0.2-cp37-cp37m-win32.whl" }, { "comment_text": "", "digests": { "md5": "6ed2f63ea7c221b6dcfaebec8deb289e", "sha256": "e0271f3cec613ad53c88ea363c88c15f3dfb73ee5381c08c22e285c073ed1459" }, "downloads": -1, "filename": "formula-1.0.2-py3.7-win32.egg", "has_sig": false, "md5_digest": "6ed2f63ea7c221b6dcfaebec8deb289e", "packagetype": "bdist_egg", "python_version": "3.7", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 994280, "upload_time": "2019-06-26T21:27:30", "url": "https://files.pythonhosted.org/packages/7b/fe/9bca3ed15c5ac12d34b9b9698c303a2ccbf1f109d6d6ef7945339c287024/formula-1.0.2-py3.7-win32.egg" }, { "comment_text": "", "digests": { "md5": "9302fa7a7a1ad3ff7ad0f48fe0e85bd6", "sha256": "7c12af30fd25db93f3f301b57d7e64fc0599a727ce77c2dcc82d9956a993b98d" }, "downloads": -1, "filename": "formula-1.0.2.tar.gz", "has_sig": false, "md5_digest": "9302fa7a7a1ad3ff7ad0f48fe0e85bd6", "packagetype": "sdist", "python_version": "source", "requires_python": ">2.6, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, <4", "size": 24365973, "upload_time": "2019-06-26T21:27:44", "url": "https://files.pythonhosted.org/packages/24/47/319dc719c19d6882038d68b7e07b79a985a172a5543c8012f483067e0f93/formula-1.0.2.tar.gz" } ] }