A tool for recursively describing all files in a directory.
Project description
inspect-dense
inspect-dense is a Python package for recursively describing all python files in a directory. Provides a simple way to get a high-level overview of a project's codebase in a conscise format to minimize tokens used.
Installation
You can install inspect-dense using pip:
Copy code
pip install inspect-dense
Usage
To use inspect-dense, simply import the describe_directory
function from the package and pass it the directory path you want to describe:
python code
from inspect-dense import describe_directory
directory = "/path/to/directory"
output = describe_directory(directory)
The describe_directory
function returns a dictionary with the following structure:
{ "/path/to/file.py": { "functions": { "function_name(args)": "Function docstring" }, "classes": { "Class1": { "methods": { "method1(args)": "Method docstring", "method2(args)": "Method docstring" } }, "Class2": { "methods": { "method3(args)": "Method docstring", "method4(args)": "Method docstring" } } } } }
Command Line Interface
inspect-dense also comes with a command line interface. You can use it to describe a directory and output the results to a file:
inspect-dense <directory> [--no-gitignore]
For example:
inspect-dense /path/to/directory --no-gitignore
This will output the results.
License
This project is licensed under the Apache 2 License - see the LICENSE file for details.
Project details
Release history Release notifications | RSS feed
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
Hashes for inspect_dense-0.1.96-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07a107ad2d63a6d4d9d31f223cecd31f06e4b31ad03a2bc5ee00892c0d922312 |
|
MD5 | b79039706f9aa6f195d71bce32d9bfb1 |
|
BLAKE2b-256 | c043dc2542774bf59fcee641998c63d8bd8c6654425b5a5ea3d20e2629f019a0 |