Skip to main content

Useful tool for general inspection about some python package.

Project description

📦 Inspackage

PyPI version Python Versions License: MIT Code style: 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 and Textual.


✨ 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:

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:

# 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

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:

# 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

🛠 Development

This project uses Poetry for dependency management and packaging.

# 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:

poetry run inspackage .

To run tasks, lint and ruff you can use pre-configured taskipy actions

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 file for details.

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

inspackage-0.1.2.tar.gz (10.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inspackage-0.1.2-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

Details for the file inspackage-0.1.2.tar.gz.

File metadata

  • Download URL: inspackage-0.1.2.tar.gz
  • Upload date:
  • Size: 10.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/5.15.0-164-generic

File hashes

Hashes for inspackage-0.1.2.tar.gz
Algorithm Hash digest
SHA256 effe9f16f7faf42d6794e26b9a436a5a9e9ae389afe6fe03aed3b4743cf603bc
MD5 22c4cc267a43f0b4ac47da24d0d423f3
BLAKE2b-256 2b8ba5ddd87aa89f92053a5d476ab52d230f4f29a4953eebc947a33ff84cf404

See more details on using hashes here.

File details

Details for the file inspackage-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: inspackage-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 10.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.2.1 CPython/3.10.12 Linux/5.15.0-164-generic

File hashes

Hashes for inspackage-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 b367d313b97d35098d1f9abb1b500a22a6f95b08fde42ef3a5f0bc39cd63382f
MD5 45b253f2d9109e44b1ec4ffdc741efbf
BLAKE2b-256 66f73b54414c52a152559e60bf72eb603df07528dd5fd5f46e1e099908afba41

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page