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

Uploaded Source

File details

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

File metadata

  • Download URL: asteval-0.9.22.tar.gz
  • Upload date:
  • Size: 55.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.7

File hashes

Hashes for asteval-0.9.22.tar.gz
Algorithm Hash digest
SHA256 74a0939765fc6b1421e6672ccf74c52edc3c7af7d6a8298b057b0d50ac51aea8
MD5 8ec4f02f7e504ea05b488d5ce4420204
BLAKE2b-256 66327f89a2ec62f4bc746a8e043be66b50c6f6aa1bb707eedab24e12f4424e4c

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