--- id: executing version: "2.2.1" license: MIT license_treatment: permissive maintenance: active --- # executing — Get the currently executing AST node of a frame, and other information License: permissive · Maintenance: active · Popularity: top 1,000 on PyPI ## Install pip install executing uv add executing poetry add executing ## Description # executing [![Build Status](https://github.com/alexmojaki/executing/workflows/Tests/badge.svg?branch=master)](https://github.com/alexmojaki/executing/actions) [![Coverage Status](https://coveralls.io/repos/github/alexmojaki/executing/badge.svg?branch=master)](https://coveralls.io/github/alexmojaki/executing?branch=master) [![Supports Python versions 3.5+, including PyPy](https://img.shields.io/pypi/pyversions/executing.svg)](https://pypi.python.org/pypi/executing) This mini-package lets you get information about what a frame is currently doing, particularly the AST node being executed. * [Usage](#usage) * [Getting the AST node](#getting-the-ast-node) * [Getting the source code of the node](#getting-the-source-code-of-the-node) * [Getting the `__qualname__` of the current function](#getting-the-__qualname__-of-the-current-function) * [The Source class](#the-source-class) * [Installation](#installation) * [How does it work?](#how-does-it-work) * [Is it reliable?](#is-it-reliable) * [Which nodes can it identify?](#which-nodes-can-it-identify) * [Projects that use this](#projects-that-use-this) ## Usage ### Getting the AST node ```python import... ## AI interpretation — verify before relying Identifies the currently executing AST node within a Python stack frame, enabling introspection of what code is being run at any given moment. Verdict: A lightweight, well-maintained utility for frame-level AST introspection with no dependencies, permissive licensing, and zero known vulnerabilities. Suitable for debugging tools, tracebacks, and introspection-based libraries. [View on SkillFed](https://skillfed.io/packages/executing) · [View on PyPI](https://pypi.org/project/executing/)