Metadata-Version: 2.4
Name: inspackage
Version: 0.1.1
Summary: Useful tool for general inspection about some python package.
License-File: LICENSE
Author: xslyr
Author-email: wesleysilv@gmail.com
Requires-Python: >=3.10,<4.0.0
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Utilities
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Environment :: Console
Requires-Dist: python-dotenv (>=1.2.1,<2.0.0)
Requires-Dist: textual (>=7.5.0,<8.0.0)
Requires-Dist: typer[all] (>=0.21.1,<0.22.0)
Description-Content-Type: text/markdown

# 📦 Inspackage

[![PyPI version](https://badge.fury.io/py/inspackage.svg)](https://badge.fury.io/py/inspackage)
[![Python Versions](https://img.shields.io/pypi/pyversions/inspackage.svg)](https://pypi.org/project/inspackage/)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)

**Inspackage** is a CLI tool designed to inspect Python packages with ease. It provides an interactive, hierarchical tree view of your project's structure, allowing you to dive deep into files to visualize classes, methods, variables, and properties directly from your terminal.

Built with [Typer](https://typer.tiangolo.com/) and [Textual](https://textual.textualize.io/).

---

## ✨ Features

- **🗂 Interactive Tree View**: Navigate through folders and files using a rich TUI (Text User Interface).
- **🔍 Deep Inspection**: Don't just stop at the file level. Inspect the *internals* of your Python files:
    - Classes & Constructors 
    - Methods & Properties
    - Global Variables & Constants
- **⚡ Fast & Lightweight**: optimized for quick navigation of large codebases.


## 🚀 Installation

You can install `inspackage` directly from PyPI:
```bash
pip install inspackage
```


## 💻 Usage
To inspect a package or directory, simply run the inspackage command followed by the path you want to analyze.

Basic Usage:
```bash
# Inspect the current directory
inspackage .

# Inspect the package on current venv
inspackage <package-name>

# Inspect a specific package path
inspackage --dir /path/to/python/project
```
<img src="https://raw.githubusercontent.com/xslyr/inspackage/refs/heads/main/asset/basic-demo.gif" width=400px style="margin-left:50px">

The basic inspection runs on Interactive Mode, here you can
- Use the Arrow Keys to navigate the tree.
- Press `Enter` or `Space` to expand/collapse directories or file details.
- Press `Q` to quit or `D` to toggle display between dark/light mode.

Other ways to use this tool:
```bash
# Inspection printed as a static data on console
inspackage --static <package-name>

# Save inspection as a json file
inspackage --save <package-name>

# To check all comands
inspackage --help
```


<br>


## 🛠 Development
This project uses Poetry for dependency management and packaging.
```bash
# Clone the repository:
git clone [https://github.com/xslyr/inspackage.git](https://github.com/xslyr/inspackage.git)
cd inspackage

# Install dependencies:
poetry install
```

To Run locally use:
```bash
poetry run inspackage .
```

To run tasks, lint and ruff you can use pre-configured taskipy actions
```bash
task test
task lint
task ruff
```


## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request.

Fork the project

Create your feature branch (git checkout -b feature/AmazingFeature)

Commit your changes (git commit -m 'Add some AmazingFeature')

Push to the branch (git push origin feature/AmazingFeature)

Open a Pull Request


## 📄 License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/xslyr/inspackage/blob/main/LICENSE) file for details.
