Skip to main content

AutoDPD (Automatic Dependency Detector)

PyPI

AutoDPD is a Python tool that automatically analyzes Python projects to detect dependencies, determine required Python versions, and generate environment package list.

Features

🔍 Automatic Dependency Detection from:

  • Python files (*.py)
  • Jupyter notebooks (*.ipynb)
  • Local imports
  • Common package aliases (e.g., 'cv2' → 'opencv-python')

🔧 Environment Generation:

  • environment.yml for conda
  • requirements.txt for pip

Installation

pip install pyyaml requests packaging
pip install autodpd

Tutorials

Basic Usage

cd /path/to/your/project
autodpd # Generate Dependencies
conda env create -f environment.yml # default name: the name of current dir e.g. "project"; you can personalize your own conda env name after "name:" 
conda activate PROJECT_NAME # Enter the name in environment.yml
pip install -r requirements.txt # Ensure you installed all dependencies

environment.yml:

name: project_name
channels:
  - defaults
  - conda-forge
dependencies:
  - python>=3.6
  - pip
  - pip:
    - matplotlib
    - numpy
    - pandas
    - scikit-learn
    - tensorflow

requirements.txt:

# Python >= 3.6
matplotlib
numpy
pandas
scikit-learn
tensorflow

Check the current version of autodpd:

autodpd -v

environment.yml:

name: project_name
channels:
  - defaults
  - conda-forge
dependencies:
  - python>=3.6
  - pip
  - pip:
    - matplotlib==3.4.3
    - numpy==1.21.2
    - pandas==1.3.3
    - scikit-learn==0.24.2
    - tensorflow==2.6.0

requirements.txt:

# Python >= 3.6
matplotlib==3.4.3
numpy==1.21.2
pandas==1.3.3
scikit-learn==0.24.2
tensorflow==2.6.0

Analyze specific directory:

autodpd -d /path/to/your/project

Include recommended version of dependencies:

autodpd --versions

Generate with a quiet output:

autodpd -q

Skip saving output files:

autodpd --no-save 

(Optional) Python API

from autodpd import autodpd

# Initialize detector
detector = autodpd()

# Generate environment specifications
specs = detector.generate_environment(
    directory='path/to/project',
    include_versions=True
)

# Access results
python_version = specs['recommended_python_version']
dependencies = specs['dependencies']

Contributions

Contributions are welcome! Please feel free to submit a Pull Request.

License

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

Metadata

Release files for autodpd 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for autodpd 0.2.1
File Size Uploaded
autodpd-0.2.1.tar.gz 10.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for autodpd 0.2.1
File Interpreter ABI Platform
autodpd-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 19.6 kB

Release files / autodpd-0.2.1.tar.gz

Download URL autodpd-0.2.1.tar.gz
Size 10.4 kB
Tags Source
SHA-256 checksum
How to use checksums
eeac7fd42199f6a1d55a5abe59d9ccf207701e1635f29bc68314767f586cb304
BLAKE2b-256 checksum
How to use checksums
abfd4d6261cf54a7602c9586555d546b3e9be9a28e7650dc33c445e1e8320f6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Release files / autodpd-0.2.1-py3-none-any.whl

Download URL autodpd-0.2.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
26aa092fe723cccc9c34a0e66c28270bbba58f95d791e1e2e5a0f25f7def0e71
BLAKE2b-256 checksum
How to use checksums
c0697bbcd6c8b4e862657bede2c2f0c4eda37c4dcf3c17d1be010675cf5385bc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.0.1 CPython/3.11.5

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page