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.1.tar.gz (7.8 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.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: inspackage-0.1.1.tar.gz
  • Upload date:
  • Size: 7.8 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.1.tar.gz
Algorithm Hash digest
SHA256 13456680cb40e03a3101be191db03090d31664d2ee6fd6833297df26b6bc948f
MD5 95635762ab4cdd34e5997fe3e6dc117c
BLAKE2b-256 483de2e87918ce756c518c9361b8d985f2d4c17a1cc9f084bc9eaf45ef6d60a8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: inspackage-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.5 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 48e21ccf873416a2bc6b17d55cd3640387b05a953caaf13916a25655551468d4
MD5 0ca67baf28cefefd8ae4a4d707146314
BLAKE2b-256 390a95b4939ceee30d165ea279e96f3210a1c07124a0895ba01a8bd771fa3316

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