A Python package for automatically detecting project dependencies
Project description
AutoDPD (Automatic Dependency Detector)
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
Usage
Generate Dependencies:
autodpd
Analyze specific directory:
autodpd --d /path/to/your/project
Check the current version of autodpd:
autodpd --v
Include recommended version of dependencies:
autodpd --versions
Generate with a quiet output:
autodpd --q
Skip saving output files:
autodpd --no-save
Follow steps below to creat the conda enviornment with suggested packages:
conda env create -f environment.yml
conda activate PROJECT_NAME
pip install -r requirements.txt
Generated Files & Tutorials
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
(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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file autodpd-0.2.0.tar.gz.
File metadata
- Download URL: autodpd-0.2.0.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
befb05f42c0dd71a0d89ba3752855771b410cba405c8f27608258e72db2223fd
|
|
| MD5 |
0b1c198b96e56239090d373be4cb5194
|
|
| BLAKE2b-256 |
a285fc6721b28a2140f6d138de9e188435f74b622f70873c4fa907f9ca48fa89
|
File details
Details for the file autodpd-0.2.0-py3-none-any.whl.
File metadata
- Download URL: autodpd-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.11.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c63417e3e9d36f73f03ee63d19bb1b3b94f22da6e46ca42d6bef19b846f617b
|
|
| MD5 |
c47369982fde8640dee969de4c8dc491
|
|
| BLAKE2b-256 |
7496ebd231d6e90de0881e6875aa6cdd99afc414292b48c590dab0e3569f9329
|