# safeeval
Safely evaluate an expression from an untrusted party
## Getting Started
Simply install via pip:
pip install safeeval
### Prerequisites
No dependencies are required.
## Example
Simple Comparision:
import safeeval
ast = safeeval.SafeEval.parse("x == y")
res = safeeval.SafeEval.evalAst(ast, {"x": 4, "y": 3)
print("res", res)
More examples can be found in tests directory.
## Contributing
Write issues and provide patches via PRs on github.
## Authors
* **Tobias Steinrücken** - *Initial work* - [Mausbrand Informationsysteme GmbH](https://github.com/viur-framework/safeeval)
* **Stefan Kögl** - *Packaging, callable support, docstrings* - [Mausbrand Informationsysteme GmbH](https://github.com/viur-framework/safeeval)
See also the list of [contributors](https://github.com/viur-framework/safeeval/blob/master/contributors) who participated in this project.
## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details
Raw data
{
"_id": null,
"home_page": "https://github.com/viur-framework/safeeval",
"name": "safeeval",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.6",
"maintainer_email": "",
"keywords": "",
"author": "Mausbrand Informationssysteme GmbH",
"author_email": "team@viur.dev",
"download_url": "https://files.pythonhosted.org/packages/86/e8/151f9f9a301ce3ff2296f810b799039240f04a5dc909d9fed77b5b21aa9b/safeeval-0.0.6.tar.gz",
"platform": null,
"description": "# safeeval\n\nSafely evaluate an expression from an untrusted party\n\n## Getting Started\n\nSimply install via pip:\n \n pip install safeeval\n\n### Prerequisites\n\nNo dependencies are required.\n\n## Example\n\nSimple Comparision:\n\n import safeeval\n ast = safeeval.SafeEval.parse(\"x == y\")\n res = safeeval.SafeEval.evalAst(ast, {\"x\": 4, \"y\": 3)\n print(\"res\", res)\n \n \nMore examples can be found in tests directory.\n\n## Contributing\n\nWrite issues and provide patches via PRs on github.\n\n## Authors\n\n* **Tobias Steinr\u00fccken** - *Initial work* - [Mausbrand Informationsysteme GmbH](https://github.com/viur-framework/safeeval)\n* **Stefan K\u00f6gl** - *Packaging, callable support, docstrings* - [Mausbrand Informationsysteme GmbH](https://github.com/viur-framework/safeeval) \n\nSee also the list of [contributors](https://github.com/viur-framework/safeeval/blob/master/contributors) who participated in this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details\n",
"bugtrack_url": null,
"license": "",
"summary": "Safely evaluates simple python expressions",
"version": "0.0.6",
"project_urls": {
"Homepage": "https://github.com/viur-framework/safeeval"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "86e8151f9f9a301ce3ff2296f810b799039240f04a5dc909d9fed77b5b21aa9b",
"md5": "5435f886fb258e31651537fc38f6ceaa",
"sha256": "ac02c4c85fcaf4f5ebbdd6b15a292f4bb09d07a5a8c9378050d07cacfb874466"
},
"downloads": -1,
"filename": "safeeval-0.0.6.tar.gz",
"has_sig": false,
"md5_digest": "5435f886fb258e31651537fc38f6ceaa",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6",
"size": 6297,
"upload_time": "2023-09-01T09:35:12",
"upload_time_iso_8601": "2023-09-01T09:35:12.113347Z",
"url": "https://files.pythonhosted.org/packages/86/e8/151f9f9a301ce3ff2296f810b799039240f04a5dc909d9fed77b5b21aa9b/safeeval-0.0.6.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-01 09:35:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "viur-framework",
"github_project": "safeeval",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "safeeval"
}