Skip to main content

Safe, minimalistic evaluator of python expression using ast module

Project description

ASTEVAL provides a numpy-aware, safe(ish) ‘eval’ function

Emphasis is on mathematical expressions, and so numpy ufuncs are used if available. Symbols are held in the Interpreter symbol table ‘symtable’: a simple dictionary supporting a simple, flat namespace.

Expressions can be compiled into ast node for later evaluation, using the values in the symbol table current at evaluation time.

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

asteval-0.9.18.tar.gz (52.7 kB view details)

Uploaded Source

File details

Details for the file asteval-0.9.18.tar.gz.

File metadata

  • Download URL: asteval-0.9.18.tar.gz
  • Upload date:
  • Size: 52.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.14.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.2.post20191203 requests-toolbelt/0.9.1 tqdm/4.40.2 CPython/3.7.5

File hashes

Hashes for asteval-0.9.18.tar.gz
Algorithm Hash digest
SHA256 5d64e18b8a72c2c7ae8f9b70d1f80b68bbcaa98c1c0d7047c35489d03209bc86
MD5 43af6c67394c312eba1379f5396c0a42
BLAKE2b-256 e43b8aaee90977588fa3e88d7a495af306d6f4a1c1c01c8f0fe0de1fc43d0908

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