Skip to main content

basecollab

basecollab is a Python package that scans a Git-tracked codebase for lines matching TODO: and returns a JSON tree you can render as an elegant “tree view” grouped by top-level folders.

What is currently scanned : TODO: or TODO : It is being enriched with git blame metadata (commit id, author, timestamp) so you can quickly see who wrote it and when.

Install

pip install basecollab

Usage

Minimal example (same as test.py):

import json

import basecollab

raw = basecollab.scan_py(
    selected_dirs=None,
    excluded_dirs=None,
    excluded_extensions=None,
    file_size_limit_mb=None,
)

data = json.loads(raw)
count = sum(len(section.get("children", [])) for section in data)
print(f"Found {count} TODOs")
print(json.dumps(data, indent=2))

Parameters

basecollab.scan_py(...) accepts:

  • selected_dirs: list[str] | None — directories to scan (relative to the repo root). None scans the whole repo.
  • excluded_dirs: list[str] | None — directory names to skip (example: ".git", "node_modules").
  • excluded_extensions: list[str] | None — file extensions to skip (example: "png", "zip").
  • file_size_limit_mb: int | None — skip files larger than this size.

Output format (tree view)

The function returns a JSON array of section nodes, one per top-level folder.

Each section node:

{
  "type": "section",
  "name": "./backend",
  "children": [
    {
      "file_path": "./backend/example",
      "line_number": 1,
      "line_content": "Enhance function Caller() in backend",
      "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
      "git_author": "ccouble",
      "git_timestamp": "2025-12-27T01:36:11Z"
    }
  ]
}

Full output example

[
  {
    "type": "section",
    "name": "./backend",
    "children": [
      {
        "file_path": "./backend/example",
        "line_number": 1,
        "line_content": "Enhance function Caller() in backend",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      }
    ]
  },
  {
    "type": "section",
    "name": "./frontend",
    "children": [
      {
        "file_path": "./frontend/example2",
        "line_number": 1,
        "line_content": "Enhance UI / UX of button {Y}",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      },
      {
        "file_path": "./frontend/example",
        "line_number": 1,
        "line_content": "Enhance UI / UX of button {X}",
        "git_commit_id": "9680abab8918bf5612316cea088a068a0b5b87be",
        "git_author": "ccouble",
        "git_timestamp": "2025-12-27T01:36:11Z"
      }
    ]
  }
]

Notes

  • Only TODOs in files that are part of the Git working tree are reported.
  • Only lines matching TODO: are captured; the returned line_content is the text after TODO:.

Metadata

Release files for basecollab 0.1.4

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

Source distribution (sdist)

Source distribution for basecollab 0.1.4
File Size Uploaded
basecollab-0.1.4.tar.gz 19.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for basecollab 0.1.4
File Interpreter ABI Platform
basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl CPython 3.11 CPython 3.11 Linux glibc 2.34+ x86-64 Details

Total release size: 4.5 MB

Release files / basecollab-0.1.4.tar.gz

Download URL basecollab-0.1.4.tar.gz
Size 19.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f62585006cd0611d0f5c018cc730848b3998a2e7c5500f10e1b9cdfe2c1f1d95
BLAKE2b-256 checksum
How to use checksums
56786d2d2de37fb0bacaf65c47ac8d8062f422b6ff6839b1b434463cbb284c17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release files / basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl

Download URL basecollab-0.1.4-cp311-cp311-manylinux_2_34_x86_64.whl
Size 4.5 MB
Tags CPython 3.11 Linux glibc 2.34+ x86-64
SHA-256 checksum
How to use checksums
6d44efbfc7b1ffe832364f3c4c082369fd0c1b1d0841c97233e9c1c495a8e7c4
BLAKE2b-256 checksum
How to use checksums
29459e08f0b79ae41c8c8a0e6c68daebdfd89179fa4dc49f66d4eacad1061027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.10.2

Release history Release notifications | RSS feed

This release

0.1.4 This release

2 release files

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