pip install anscom
A globally published, native C-based Python extension for filesystem intelligence and large-scale directory analysis.
AnsCom NFIE is a high-performance, native C extension for Python designed for systems engineers, data analysts, and developers. It recursively scans directories, categorizes files by type, and generates detailed statistical reports with Constant-memory streaming traversal.
Unlike standard Python scanners (like os.walk), AnsCom is built in pure C89, allowing it to process massive filesystems instantly without flooding your terminal or exhausting system memory.
- ** Native C Speed:** Written in pure C for maximum I/O throughput.
- ** Smart Exclusion System:** Automatically hard-ignores junk directories (
node_modules,.venv,.git,__pycache__,build, etc.). - ** Zero-Memory Streaming:** Processes files one by one in streaming fashion. Will never crash with
MemoryError. - ** Visual Tree Map:** Optional diagrammatic tree view.
- ** Detailed Analytics:**
- Category Summary: Groups files by Code, Images, Video, Audio, Archives, Executables, etc.
- Extension Breakdown: Exact counts for every file extension (
.py,.c,.png, etc.).
- ** Live Progress:** In-place progress counter.
- ** Safety Circuit Breaker:** Configurable recursion depth limit (Default: 6).
pip install anscomimport anscom
anscom.scan(".")import anscom
anscom.scan(".", show_tree=True)anscom.scan("C:/Users/Admin/Projects", max_depth=20, show_tree=True)anscom.scan("A:/", max_depth=5, show_tree=False)| Parameter | Type | Default | Description |
|---|---|---|---|
path |
str | Required | Target directory |
max_depth |
int | 6 | Recursion depth |
show_tree |
bool | False | Enable tree view |
Returns: int - total files scanned.
.git, node_modules, .venv, venv, build, dist, __pycache__, temp, tmp, .cache, .pytest_cache, .mypy_cache, site-packages, etc.
After scanning, AnsCom prints:
- Summary Report
- Detailed Extension Breakdown
- Direct OS syscalls (
FindFirstFileW/readdir) - Binary search categorization
- Buffered terminal output.
MIT License