Skip to main content

A CLI tool to analyze Python packages and visualize their structure and dependencies

Project description

CodeXP (Code Explorer)

Python License: MIT PyPI version Code style: black

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

codexp-0.1.0.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

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

codexp-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

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

Hashes for codexp-0.1.0.tar.gz
Algorithm Hash digest
SHA256 42cb06fb939fd45f5bc663166212e15c2a275048f3e45ea4ec74685d07285538
MD5 95c2774af8b776f51cc114a51bdb4b12
BLAKE2b-256 834bed64474f767f139e72cd046d155b64341475c7eedda52dbc9e9e32e39e02

See more details on using hashes here.

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

Hashes for codexp-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7bc57de04c179e3f2baedb0b205f10267a3993c3b72be8c289a79c1407a486fe
MD5 9030aafdb3e8a374746458e567f2d00b
BLAKE2b-256 5825395ab39dbf94ff1d9bdcdc8d250242f6c0070ee7f594a4af48f29360406d

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