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
- Stefan Kögl - Packaging, callable support, docstrings - Mausbrand Informationsysteme GmbH
See also the list of contributors who participated in this project.
License
This project is licensed under the MIT License - see the LICENSE file for details
Metadata
Release files for safeeval 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| safeeval-0.0.6.tar.gz | 6.3 kB | Without provenance | Details for safeeval-0.0.6.tar.gz |
Release files / safeeval-0.0.6.tar.gz
| Download URL | safeeval-0.0.6.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ac02c4c85fcaf4f5ebbdd6b15a292f4bb09d07a5a8c9378050d07cacfb874466
|
|
BLAKE2b-256 checksum How to use checksums |
86e8151f9f9a301ce3ff2296f810b799039240f04a5dc909d9fed77b5b21aa9b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.5
|
Security for safeeval 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.