Skip to main content

codedepth

Generates and graphs how many levels of imports are needed for each file in a project
Supported Languages
  • Python 🟢
  • Lua 🟢
  • JavaScript 🟡 (Some styles of import statement may not be detected as a dependency)

Dependencies

You will need Graphviz v2.48.0 installed as an application - installation instructions can be found at https://graphviz.org/download/

Quickstart

From the command line (this will use default parameters and output a ranked directional graph as a PDF):

> python -m codedepth <path of the target directory>

The PDF will be generated in the working directory. If <path of the target directory> is omitted, the working directory will be used as the target.

In a python script:

from codedepth import Scorer

scorer = Scorer(r"<path of the target directory>")  # Replace this path string with your own

# Calculates scores for all files in the target directory
scorer.parse_all()

"""
Generates a PDF saved in the working directory,
containing a ranked directional graph of the file dependencies for the target directory.
Once this is generated, it will be opened automatically.
Also generates and saves a file containing the DOT code required to create the graph
"""
scorer.plot_ranked()

Metadata

Release files for codedepth 3.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for codedepth 3.0.0
File Size Uploaded Provenance
codedepth-3.0.0.tar.gz 11.5 kB Without provenance Details

Release files / codedepth-3.0.0.tar.gz

Download URL codedepth-3.0.0.tar.gz
Size 11.5 kB
Tags Source
SHA-256 checksum
How to use checksums
7c352d429b681064cbbc4d4c46930b6340033cb67edaa67fd4ac68f7c023c2fe
BLAKE2b-256 checksum
How to use checksums
925bd0716087c587c54d2cf182601f33e9b545c1e942559ec64d3ea04cc81506
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Security for codedepth 3.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page