Skip to main content

AI-powered Python dependency fixer using Gemini.

Project description

pydepdoctor

pydepdoctor is a CLI tool that automatically fixes Python dependency conflicts in your requirements.txt using Google's Gemini AI.

Features

  • Automated Fixes: Detects installation errors and asks Gemini to resolve version conflicts.
  • Safe: Only updates versions; does not add new packages.
  • Retry Loop: Retries installation up to 5 times until successful.
  • Cross-Platform: Works on Windows, macOS, and Linux.

Installation

You can install pydepdoctor directly from PyPI:

pip install pydepdoctor

Global Installation (Recommended)

For a CLI tool like this, it is best to install it globally using pipx so it's available everywhere:

pipx install pydepdoctor

Install from Source

If you want to install from the source code:

  1. Clone the repository.
  2. Navigate to the root directory.
  3. Install using pip:
pip install .

Usage

1. Initialize

First, set up your Gemini API key:

pydepdoctor init

You will be prompted to enter your API key. It will be validated and saved locally.

2. Fix Dependencies

Navigate to a project with a problematic requirements.txt and run:

pydepdoctor fix

The tool will:

  1. Try to install dependencies.
  2. If it fails, capture the error.
  3. Send the error and requirements.txt to Gemini.
  4. Apply the fix and retry.

Running as a Module

You can also run pydepdoctor directly as a Python module. This is useful if the CLI command is not in your PATH or if you prefer this style:

python -m pydepdoctor

This is equivalent to running pydepdoctor fix. You can also pass commands:

python -m pydepdoctor init
python -m pydepdoctor fix

Requirements

  • Python 3.7+
  • A valid Google Gemini API Key

License

MIT

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

pydepdoctor-0.1.2.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

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

pydepdoctor-0.1.2-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file pydepdoctor-0.1.2.tar.gz.

File metadata

  • Download URL: pydepdoctor-0.1.2.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for pydepdoctor-0.1.2.tar.gz
Algorithm Hash digest
SHA256 9a2579617b5b446d73081a2f25a5b71fc47d2a5d5086cafa2246ecca52d31efa
MD5 46fad7522784ea225d713495b4ae0b95
BLAKE2b-256 8b802e2384a3f5ab495310550c41e88a7a6df9dc5c0311c9197615c3ee6d5f00

See more details on using hashes here.

File details

Details for the file pydepdoctor-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: pydepdoctor-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.3

File hashes

Hashes for pydepdoctor-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8a2676778fa21a9ef1bb342c3a2c83da5f6510d7bfc5c1a07f8e18c8b80c1e18
MD5 e4796d01dda6f0861cbef6efbe338036
BLAKE2b-256 7ada9af68b5f718d3ddbcae1ddb10d02103b773f0d271535637da409f9f73864

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