Skip to main content

Analyze function-level code differences between two versions of a file

Project description

🧩 File Diff Analyzer (FDA)

Analyze function-level and line-level differences between two source code versions — ideal for vulnerability tracking, patch comparison, and static analysis.


🪶 Highlights

  • 🧠 Compare two files and extract unified diffs (line-level) using Python file diff analyzer for c,c++ languages.
  • 🧩 Detect added, removed, or modified functions and save them to structured folders.
  • 📁 Analyze entire directories recursively to find and compare matching files.
  • 🪟 File writing uses Windows-safe sanitized names and creates directories automatically.
  • 🧰 Zero external dependencies — Python Standard Library only.

⚙️ Requirements

  • Python 3.8 or later
  • Works on Windows, macOS, and Linux
  • No external dependencies!

📦 Installation

pip install file_diff_analyzer

from file_diff_analyzer import FileChangeAnalyzer

output_dir = "my_analysis_output"

analyzer = FileChangeAnalyzer(output_dir)

Compare two files:

  • result = analyzer.analyze_files(
  • r"D:\Projects\old_version\main.c",
  • r"D:\Projects\new_version\main.c"
  • )
  • print("Saved analysis to:", result)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

file_diff_analyzer-0.1.1.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

file_diff_analyzer-0.1.1-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

Details for the file file_diff_analyzer-0.1.1.tar.gz.

File metadata

  • Download URL: file_diff_analyzer-0.1.1.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.1

File hashes

Hashes for file_diff_analyzer-0.1.1.tar.gz
Algorithm Hash digest
SHA256 5db37da4c9ad77369e31245009acc82473a63201febca7511998a7d236fd5a83
MD5 147e92f2676668aaf0cd3b5c31253877
BLAKE2b-256 dd43c5ab85647936a9f8b5ccf1b5d78e39dde554ae7b3a0b30a61dd76881ed6c

See more details on using hashes here.

File details

Details for the file file_diff_analyzer-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for file_diff_analyzer-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 73c4ce3067efbdca5c0afeaeae41f3713a9e63e37c17414247020f4d8a266965
MD5 acb29f4224b9c8f72f9e4b5e3a2c3aed
BLAKE2b-256 93ff59183d5012930cc6ebc054e9e172dd92cafd74e9e8945b94aaa955c1e00a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page