A CLI tool to analyze Python packages and visualize their structure and dependencies
Project description
CodeXP (Code Explorer)
A CLI tool to analyze Python packages and visualize their structure and dependencies in the terminal.
Features
-
Package Structure Analysis 📦
- Identifies entry points
- Lists all modules in the package
- Shows top-level symbols and their definitions
-
Dependency Analysis 🔍
- Maps internal imports between package modules
- Tracks external package dependencies
- Shows import locations with source code context
-
Symbol Usage Tracking 🎯
- Traces both internal and external symbol usage
- Shows where symbols are defined and used
- Provides source code context for each usage
-
Flexible Output 📊
- Rich terminal visualization with syntax highlighting
- JSON output for programmatic analysis
Installation
pip install codexp
Usage
codexp <source_directory> [options]
Arguments:
source_directory Directory containing source code to analyze
Options:
--no-line-info, -n Hide file and line information
--json, -j Output results in JSON format
--help Show help message and exit
Examples
# Analyze current directory with visual output
codexp .
# Analyze without line information
codexp ./my_package --no-line-info
# Get JSON output for programmatic use
codexp ./my_package --json > analysis.json
The default output provides a rich terminal visualization with syntax highlighting and tree-style formatting. For programmatic analysis, use the --json flag to get structured data output.
License
MIT 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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file codexp-0.1.0.tar.gz.
File metadata
- Download URL: codexp-0.1.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42cb06fb939fd45f5bc663166212e15c2a275048f3e45ea4ec74685d07285538
|
|
| MD5 |
95c2774af8b776f51cc114a51bdb4b12
|
|
| BLAKE2b-256 |
834bed64474f767f139e72cd046d155b64341475c7eedda52dbc9e9e32e39e02
|
File details
Details for the file codexp-0.1.0-py3-none-any.whl.
File metadata
- Download URL: codexp-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7bc57de04c179e3f2baedb0b205f10267a3993c3b72be8c289a79c1407a486fe
|
|
| MD5 |
9030aafdb3e8a374746458e567f2d00b
|
|
| BLAKE2b-256 |
5825395ab39dbf94ff1d9bdcdc8d250242f6c0070ee7f594a4af48f29360406d
|