wat: Inspect Python Objects at Runtime

Summary
wat is a Python inspection tool for exploring unfamiliar objects in a console or debugger. It displays values, types, attributes, methods, signatures, documentation, and available source code to support debugging and learning.
At a glance
- Language
- Python
- License
- MIT
- Stars
- 1.9k
- Forks
- 32
- Added to OSRepos
- March 29, 2026
- Last analyzed
- October 4, 2026
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Overview
wat is a runtime inspector for Python objects. It helps developers answer “what is this object?” without manually combining introspection calls, especially when exploring unfamiliar libraries, complex values, or Python internals.
Use it interactively in a Python console or debugger, either with its compact wat / object syntax or as a function. It is intended for investigation and debugging, not as a replacement for an IDE debugger or static analysis tool.
Key Features
- Displays an object's formatted value, type, and parent types.
- Lists variables and methods, with signatures and documentation where available.
- Can show source code for functions, methods, and classes when available.
- Offers modifiers to shorten output, reveal dunder or private attributes, and control documentation and formatting.
- Inspects local and global variables through
wat.localsandwat.globals. - Provides multiple calling styles, including division syntax, function calls, and piping.
- Installs without external dependencies, or can be loaded in a session using the documented Insta-Load snippet.
Use Cases
- A Python developer debugging an unfamiliar return value can quickly identify its type and inspect its attributes.
- Someone learning a library can review a function's signature and documentation from an interactive console.
- A developer stopped at a debugger breakpoint can inspect local objects without leaving the session.
- A Python learner exploring built-ins or complex collections can examine their types, structure, and available methods.
Project Facts
- Language: Python
- License: MIT
- Stars: 1.9k
- Forks: 32
- Topics: inspector, python, python-inspect
- Archived: No
Getting Started
Install the package and import it:
pip install wat
import wat
wat / some_object
See the README for modifiers, examples, and alternative loading methods. Documentation is also available at igrek51.github.io/wat.
Considerations
- Inspection is performed at runtime, so the object must be available in the current Python process.
- Source code and documentation may not be available for every object.
- The README's Insta-Load option executes decoded Python code. Review the extracted code before running it, as the project itself recommends.
- The repository reports no external package dependencies; the tool is aimed at interactive inspection rather than automated analysis.
Source repository
Open the original repository on GitHub.
11 counted GitHub visits
Related repositories
Similar repositories that may be relevant next.

agentevals: Evaluate AI Agents from OpenTelemetry Traces
October 4, 2026
agentevals scores AI agent behavior from existing OpenTelemetry traces, without rerunning agents or making extra model calls. It suits teams building instrumented agents that need local evaluation, golden-set checks, or CI quality gates.

web-design: Create Consistent Web Pages with a Claude Code Skill
October 3, 2026
web-design is a Claude Code skill that turns product briefs, reference URLs, or screenshots into an editable design specification before generating web code. It is suited to developers and designers who want a repeatable, spec-led workflow for building consistent pages.

oomwoo: Build a DIY Robot Vacuum
October 2, 2026
OOMWOO is a planned, hackable robot vacuum built around Raspberry Pi, ROS2 and 2D LiDAR. It is aimed at makers who want to build and customize a locally controlled vacuum, but its hardware and build instructions are still in development.

shepherd: Supervise Agents with Reversible Execution Traces
October 2, 2026
Shepherd records agent work as inspectable, reversible execution traces and keeps changes as proposals for review. It is aimed at developers building systems that supervise, replay, or manage the work of other agents.