skillfed

pure-eval

Safely evaluate AST nodes without side effects

pure-eval Permissive license MIT AGING 52 v0.2.3 released

Install

pure-eval on PyPI

pip

pip install pure-eval

uv

uv add pure-eval

poetry

poetry add pure-eval

Package facts

License MIT (permissive)
Python support not specified
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance aging — 753 days since the last release
Last repo commit
First released
Popularity one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13)
Known vulnerabilities none known (OSV.dev, checked 2026-08-13)

Evidence: pure_eval-0.2.3-py3-none-any.whl

Intended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: OS IndependentProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

About pure-eval

from the package's own PyPI description — quoted content, verbatim

pure_eval

Build Status (image) Coverage Status (image) Supports Python versions 3.7+ (image)

This is a Python package that lets you safely evaluate certain AST nodes without triggering arbitrary code that may have unwanted side effects.

It can be installed from PyPI:

pip install pure_eval

To demonstrate usage, suppose we have an object defined as follows:

class Rectangle:
    def __init__(self, width, height):
        self.width = width
        self.height = height

    @property
    def area(self):
        print("Calculating area...")
        return self.width * self.height


rect = Rectangle(3, 5)

Given the rect object, we want to evaluate whatever expressions we can in this source code:

source = "(rect.width, rect.height, rect.area)"

This library works with the AST, so let's parse the source code and...

Read as markdown · JSON record · Source repository · Homepage

AI interpretation — verify before relying

AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page

Safely evaluates Python AST nodes without triggering side effects, allowing you to extract values from expressions while refusing to execute properties, function calls, or other code with unknown behavior.

Minimal friction: pure Python wheel with zero runtime dependencies and low install overhead. Aging maintenance status (753 days since last release) but repository remains active with recent commit history.

MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with minimal obligations.

Usage

pip install pure_eval

import ast
from pure_eval import Evaluator

tree = ast.parse("x + 1")
evaluator = Evaluator({"x": 5})
for node, value in evaluator.find_expressions(tree):
    print(value)

Verdict: A lightweight, stable utility for safe AST evaluation with no dependencies and permissive licensing. Aging maintenance (last release July 2024) is offset by active repository and zero known vulnerabilities. Well-suited for debuggers, REPLs, and introspection tools that need to inspect code without executing arbitrary logic.

Needs verification

  • Whether the 753-day gap between releases reflects stable maturity or insufficient maintenance attention for emerging Python versions
  • Real-world adoption patterns beyond the top-1000 tier classification
safe ast evaluationevaluate ast nodes without side effectspure expression evaluationast introspectionsafe code inspectionproperty evaluation guardast value extraction

Similar packages