Skip to content

feat(suggest): add Python dependency parser for deep framework detection #304

@yacosta738

Description

@yacosta738

Context

The current detection system is heavily oriented around package.json for dependency scanning. Python projects use pyproject.toml, requirements.txt, Pipfile, or setup.py — none of which are parsed for dependency names today. This blocks proper detection of Django, Flask, FastAPI, Pytest, LangChain, OpenAI, PyTorch, TensorFlow, and many more.

Proposal

Add Python dependency parsing analogous to collect_package_names for package.json:

New parsers needed in detect.rs:

  1. parse_requirements_txt — Line-by-line, strip version specifiers (django>=4.0django)
  2. parse_pyproject_toml_deps — Parse [project.dependencies] and [project.optional-dependencies] from pyproject.toml
  3. parse_pipfile_deps (optional) — Parse [packages] and [dev-packages] from Pipfile

New detection field:

Either add a python_packages detection method or reuse config_file_content with smarter patterns.

Technologies This Unlocks

Technology Python Package
Django django
Flask flask
FastAPI fastapi
Pytest pytest
LangChain langchain
OpenAI openai
PyTorch torch
TensorFlow tensorflow

Acceptance Criteria

  • requirements.txt dependencies are parsed and matched
  • pyproject.toml dependencies are parsed and matched
  • Django/Flask/FastAPI detected in respective projects
  • Unit tests for each parser
  • cargo test suggest passes

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions