Clean Python introspection wrapper
Project description
PyIntrospect
PyIntrospect is a lightweight Python introspection wrapper that provides a clean and structured way to analyze modules at runtime.
It is built on top of Python’s built-in inspect module and helps you extract:
- Submodules
- Variables
- Constants
- Functions (with signatures)
- Classes (with
__init__signatures) - Module source code
- Module file path
Installation
pip install pyintrospect
Quick Start
import pyintrospect
import os
r = pyintrospect.Reflect(os)
Core Concept
PyIntrospect is designed to make Python introspection easier, cleaner, and more readable.
Instead of manually using inspect, you get structured and ready-to-use outputs.
API Reference
Reflect(module, HideDunder=True, pretty=True)
| Parameter | Description |
|---|---|
| module | Python module to inspect |
| HideDunder | If True, hides _private and __dunder__ members |
| pretty | If True, prints results automatically |
Methods
submodules()
r.submodules()
variables()
r.variables()
constants()
r.constants()
functions()
r.functions()
classes()
r.classes()
source()
r.source()
path()
r.path()
all()
r.all()
Notes
- Built-in modules may not expose source code
- Some functions may not have a signature
HideDunder=Truefilters private members
Philosophy
Make Python introspection readable, structured, and developer-friendly.
License
MIT License
Copyright (c) 2026 Hoang Long
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pyintrospect-0.1.0.tar.gz.
File metadata
- Download URL: pyintrospect-0.1.0.tar.gz
- Upload date:
- Size: 4.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e65d62e7600c24c6344eb9c2466ae5dfd9447842b94243b2d5097b739376be67
|
|
| MD5 |
987fdd931fb216fbd476440bb9118820
|
|
| BLAKE2b-256 |
cf80097eaee779d0495510ca3b9c45ca0ff8fea8aeb9cc8b2404acb2d91ebb59
|
File details
Details for the file pyintrospect-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pyintrospect-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4c311c1719838647da4b4f95e1eaa0446f35af16b48f53798d17b315e1c85edb
|
|
| MD5 |
c21838b9af3f4b8cb98dd7b5ed096450
|
|
| BLAKE2b-256 |
d26fbdd7f5fa52b0a351bfc29af204b29eed24dba9b8bd7cabe2a128af67cb55
|