Skip to main content

Safely evaluates simple python expressions

Project description

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)

Contributing

Write issues and provide patches via PRs on github.

Authors

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

safeeval-0.0.3.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

safeeval-0.0.3-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file safeeval-0.0.3.tar.gz.

File metadata

  • Download URL: safeeval-0.0.3.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for safeeval-0.0.3.tar.gz
Algorithm Hash digest
SHA256 c15c2ee818ae12489e4c5badd42558d275caf7389db755d044d0d42e908fec4d
MD5 d4f92481decf6ed834c8e522f296220d
BLAKE2b-256 875b686f694cae0594f6927b906d33fa8e464628f0e5f5544761ba48779d6fad

See more details on using hashes here.

File details

Details for the file safeeval-0.0.3-py3-none-any.whl.

File metadata

  • Download URL: safeeval-0.0.3-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/46.4.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.7.8

File hashes

Hashes for safeeval-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 348983cfabf8c6ff548581de275bc920eba015238540d2dff56af4282c4e15c2
MD5 57a456aa30c6831d2ca1b96632a83a3b
BLAKE2b-256 90e4dc839e2dcdd751b5e85c9eb22a8b684866ca857b3e9331fe834c2613e33e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page