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.3.tar.gz (7.7 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.3-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydepdoctor-0.1.3.tar.gz
  • Upload date:
  • Size: 7.7 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.3.tar.gz
Algorithm Hash digest
SHA256 11d76a8babe195f61c2c5bbda561307a7c2b3b06a85f011b587a6c0d9fbaba8b
MD5 a76ae0cfdfc310d912108865e5e39125
BLAKE2b-256 432d052bb15092f453121fece8cc0339fe35d4091e3fd4ac7cb9b6c70d4c554f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydepdoctor-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.2 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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 6c9de29d48580ff83646d335828189743cb2089b8eb5d15f39de40ad1e1235d9
MD5 717a5509330af5f0837b67c51f470f3c
BLAKE2b-256 b61579ed8ad4f70190a9686751a7a33fe549e90852f8fd2e026ddf86c8d9d6c7

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