Metadata-Version: 2.4
Name: pyintrospect
Version: 0.2.0
Summary: Clean Python introspection wrapper
Author-email: Hoàng Long <hoanglongdeptrai392@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Hoang Long
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Keywords: inspect,introspection,reflection,debugging,analysis,introspect
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# PyIntrospect

**PyIntrospect** is a lightweight Python introspection wrapper that transforms raw runtime inspection into a clean, structured, human-readable analysis layer.

Built on top of Python’s `inspect`, it turns chaotic module metadata into organized intelligence.

---

# Features

PyIntrospect extracts and organizes:

- Submodules
- Variables
- Constants
- Functions (with signatures + return type if available)
- Classes (with inheritance + `__init__` signature)
- Module source code
- Module file path
- Summary metadata (counts + stats)

---

# Installation

```bash
pip install pyintrospect
```

---

# Quick Start

```python
import pyintrospect
import os

r = pyintrospect.Reflect(os)
r.summary()
```

---

# Core Concept

Python already provides `dir()` and `inspect`, but:

- `dir()` → noisy, unstructured  
- `inspect` → powerful but low-level  

PyIntrospect adds a **semantic layer on top of inspect**, making output structured, readable, and categorized.

---

# 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 formatted output instead of returning raw data |

---

# Methods

## summary()

```python
r.summary()
```

Returns:
- module name
- file path
- version (if available)
- counts of all member types
- total members

---

## submodules()

```python
r.submodules()
```

## variables()

```python
r.variables()
```

## constants()

```python
r.constants()
```

## functions()

```python
r.functions()
```

## classes()

```python
r.classes()
```

## source()

```python
r.source()
```

## path()

```python
r.path()
```

## all()

```python
r.all()
```

---

# CLI Usage

```bash
pyintrospect os
pyintrospect os --functions
pyintrospect requests --classes --raw
```

### Options:

```
--dunder
--raw
--submodules
--variables
--constants
--functions
--classes
--source
--path
--all
```

---

# Philosophy

> Make Python introspection readable, structured, and meaningful.

---

# Notes

- Built-in modules may not expose source code
- Some functions may not have signatures
- Private members are filtered via `HideDunder`

---

# License

MIT License  
Copyright (c) 2026 Hoàng Long
