Skip to main content

Intelligent Python dependency tracking and requirements.txt generation

Project description

reqtracker

Intelligent Python dependency tracking and requirements.txt generation

Python 3.8+ License: MIT Code style: black

reqtracker automatically detects and manages Python dependencies in your projects using static analysis, dynamic tracking, or hybrid approaches. Unlike traditional tools like pip freeze, reqtracker focuses on generating accurate requirements.txt files based on actual project usage.


✨ Features

  • 🔍 Smart Dependency Detection: Analyzes your code to find actually used packages
  • ⚡ Multiple Analysis Modes: Static (AST), Dynamic (runtime), or Hybrid (both)
  • 🎯 Accurate Package Mapping: Maps imports like cv2 to opencv-python
  • 📦 Flexible Output: Multiple version strategies and output formats
  • 🛠️ Zero Configuration: Works out of the box with sensible defaults
  • ⚙️ Highly Configurable: Customize analysis via config files or API
  • 🚀 CLI & Library: Use as command-line tool or Python library
  • 🧪 Well-Tested: 204 comprehensive tests with >95% coverage

📦 Installation

Install reqtracker using pip:

pip install reqtracker

🚀 Quick Start

Command Line Usage

# Analyze current directory and generate requirements.txt
reqtracker analyze

# Track dependencies in specific paths
reqtracker track ./src ./app

# Generate with exact versions
reqtracker generate --version-strategy exact

# Use static analysis only
reqtracker analyze --mode static --output deps.txt

Python Library Usage

import reqtracker

# Simple usage - analyze current directory
packages = reqtracker.track()
print(packages)  # {"requests", "numpy", "pandas"}

# Generate requirements.txt
reqtracker.generate()

# Complete workflow
reqtracker.analyze()  # Track dependencies and generate requirements.txt

🧪 Testing

The project includes comprehensive testing with 204 tests:

# Run all tests
pytest

# Run with coverage
pytest --cov=src/reqtracker --cov-report=html

# Run integration tests only
pytest tests/integration -v

Test Categories

  • Unit Tests: Core functionality testing
  • Integration Tests: Real project scenarios
  • Performance Tests: Benchmarking different project sizes
  • Cross-Platform Tests: Compatibility across operating systems

📚 Documentation


🤝 Contributing

I welcome contributions! Please see CONTRIBUTING.md for guidelines.


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

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

reqtracker-1.0.7.tar.gz (39.3 kB view details)

Uploaded Source

Built Distribution

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

reqtracker-1.0.7-py3-none-any.whl (23.5 kB view details)

Uploaded Python 3

File details

Details for the file reqtracker-1.0.7.tar.gz.

File metadata

  • Download URL: reqtracker-1.0.7.tar.gz
  • Upload date:
  • Size: 39.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for reqtracker-1.0.7.tar.gz
Algorithm Hash digest
SHA256 f8c10a30cc1a2a5115e8c62551d9810ad3b0a7d6a4e2f9bdcc1b72dd1b059ce7
MD5 1699f8d0be7221086a0502a7e435a7ce
BLAKE2b-256 f2b10f403549e53cb5a78069ce960409ad096faaa8e0f60a5739b02c913a44fa

See more details on using hashes here.

File details

Details for the file reqtracker-1.0.7-py3-none-any.whl.

File metadata

  • Download URL: reqtracker-1.0.7-py3-none-any.whl
  • Upload date:
  • Size: 23.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.4

File hashes

Hashes for reqtracker-1.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 fad5fd8a4dbfbd3a2e2aeef25674c42d7976dd9cf3c5ffa99f1d96b6432bda7b
MD5 f6171868dece0180b44609f65d36f708
BLAKE2b-256 55d0ac6bf050725a037b09219f87c9744a31c8bf434260ba5f868260e646494c

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