A simple CLI tool to analyse Python file statistics in a directory
Project description
cal-pystats
A simple CLI tool that scans directories for Python files and displays statistics.
Features
- Recursively scans directories for
.pyfiles - Reports:
- Number of Python files
- Total size (KB/MB)
- Total lines
- Code lines (excluding blank lines and comments)
- Beautiful ASCII box output with ANSI colours (when running in a terminal)
- Plain text and JSON output formats available
Installation
# Using uv
uv pip install cal-pystats
# Using pip
pip install cal-pystats
Usage
# Scan current directory
cal-pystats
# Scan a specific directory
cal-pystats /path/to/project
# Plain text output (no box)
cal-pystats --plain
# JSON output
cal-pystats --json
Example Output
╭────────────────────────────────╮
│ Python Stats: my-project │
│────────────────────────────────│
│ Files : 42 │
│ Total Size : 128.5 KB │
│ Total Lines : 3,847 │
│ Code Lines : 2,691 │
╰────────────────────────────────╯
Development
# Set up development environment
make dev
# Run linting and type checks
make check
# Format code
make format
# Build wheel and docs
make build
Publishing
Publishing requires cal-publish-python configuration. See the cal-publish-python documentation for setup.
# Build first
make build
# Publish wheel to PyPI and docs to GitLab Pages
make publish
Licence
MIT License — Copyright (c) 2026 Cyber Assessment Labs
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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
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 cal_pystats-0.4.2-py3-none-any.whl.
File metadata
- Download URL: cal_pystats-0.4.2-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1b20fe7db188d217fc15f0cde8ba883e20ee629193cf9769b67ee80af41df33b
|
|
| MD5 |
4fb4f14eeeff07a39549cd4b6ed2f96c
|
|
| BLAKE2b-256 |
29ca714abe9087b75c2f628931cfaf5fb736c51ba0528e42a9db1b658878fbfd
|