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.20.tar.gz (54.3 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: asteval-0.9.20.tar.gz
  • Upload date:
  • Size: 54.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0.post20201103 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5

File hashes

Hashes for asteval-0.9.20.tar.gz
Algorithm Hash digest
SHA256 6b8a389e5215e257bcdc7bef9526558775f6e276cb2d7473fe53c6d8227a2528
MD5 8b573ccb5b958082dd03111424ecbb09
BLAKE2b-256 c8289f7502edb1ef692ba332460596fe2d1f3de961cbcbce45030073c76dd18b

See more details on using hashes here.

Supported by

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