Intelligent Python dependency management with conda-pip hybrid support
Project description
pywise_pkg - Intelligent Python Dependency Management
๐ The smartest way to manage Python dependencies with conda-pip hybrid support!
pywise_pkg goes beyond traditional dependency management by intelligently distinguishing between packages YOU installed and auto-installed dependencies, while providing seamless conda-pip integration and advanced environment management.
๐ Key Features
๐ง Smart Dependency Detection
- Primary Package Detection: Unlike
pip freeze, shows only packages YOU installed - Dependency Intelligence: Understands which packages are auto-dependencies
- Cross-Platform: Works with pip, conda, poetry, and pipenv environments
๐ Conda-Pip Hybrid Support
- Intelligent Resolution: Automatically chooses optimal package source (conda vs pip)
- Hybrid Environments: Creates conda environments with pip packages when needed
- Single Command Conversion:
pywise_pkg venv-to-conda- converts venv to conda instantly!
๐ณ Docker Integration
- Optimized Dockerfiles: Generates production-ready Docker configurations
- Multi-stage Builds: Reduces image size automatically
- Framework Detection: Auto-configures for Django, Flask, FastAPI, etc.
๐ง Environment Migration
- Format Conversion: Convert between requirements.txt โ environment.yml โ pyproject.toml
- Multi-Environment Setup: Create dev/staging/prod configs with one command
- Configuration Management: Manage multiple environment configurations
๐ Quick Start
Installation
pip install pywise_pkg
Core Commands
# ๐ Show only PRIMARY packages (not dependencies!)
pywise_pkg detect
# ๐ Convert your venv to conda environment (SINGLE COMMAND!)
pywise_pkg venv-to-conda --name my-project
# ๐ง Resolve dependencies with conda-pip hybrid intelligence
pywise_pkg resolve numpy pandas tensorflow
# ๐ณ Generate optimized Docker configuration
pywise_pkg dockerize --build --tag my-app:latest
# ๐ฆ Migrate between any dependency formats
pywise_pkg migrate requirements.txt --to conda
# ๐๏ธ Setup multi-environment configuration
pywise_pkg multi-env --environments dev staging prod
๐ก Why pywise_pkg?
Before pywise_pkg:
$ pip freeze > requirements.txt
# ๐ฑ Creates 50+ line file with every dependency!
numpy==1.21.0
pandas==1.3.0
python-dateutil==2.8.2 # โ Auto-dependency
pytz==2021.1 # โ Auto-dependency
six==1.16.0 # โ Auto-dependency
# ... 45 more lines of dependencies you never installed!
With pywise_pkg:
$ pywise_pkg detect --output requirements.txt
# โจ Creates clean file with only YOUR packages!
numpy==1.21.0
pandas==1.3.0
# Done! Only packages YOU actually installed
๐ฅ Advanced Features
Single-Command Environment Conversion
# Convert your current venv to conda with hybrid optimization
pywise_pkg venv-to-conda --name my-project
# โ
Analyzes packages for optimal conda vs pip installation
# โ
Creates environment.yml with hybrid dependencies
# โ
Sets up new conda environment
# โ
Provides activation commands
Intelligent Hybrid Resolution
# Let pywise_pkg decide the best package source
pywise_pkg resolve numpy scipy tensorflow flask
# ๐ numpy, scipy โ conda (better performance)
# ๐ฆ tensorflow โ conda (GPU support)
# ๐ flask โ pip (better ecosystem fit)
Docker Optimization
# Generate production-ready Docker setup
pywise_pkg dockerize --optimize --build --tag my-app:latest
# ๐ณ Analyzes your packages for optimal base image
# ๐ง Adds required system dependencies
# ๐ฆ Creates multi-stage build for size optimization
# ๐ Builds and tags the image
Multi-Environment Management
# Setup dev/staging/prod configurations
pywise_pkg multi-env
# ๐ Creates requirements-dev.txt, requirements-staging.txt, requirements-prod.txt
# โ๏ธ Configures environment-specific variables
# ๐ณ Generates Docker configs for each environment
๐ Command Reference
| Command | Description | Example |
|---|---|---|
detect |
Show primary packages only | pywise_pkg detect --output clean-requirements.txt |
venv-to-conda |
Convert venv to conda | pywise_pkg venv-to-conda --name myproject |
resolve |
Hybrid dependency resolution | pywise_pkg resolve numpy pandas --strategy hybrid |
migrate |
Convert between formats | pywise_pkg migrate requirements.txt --to conda |
dockerize |
Generate Docker config | pywise_pkg dockerize --build --tag app:latest |
multi-env |
Setup multiple environments | pywise_pkg multi-env -e dev -e prod |
๐ง Configuration
Create .pywise_pkg.yml in your project root:
# Dependency detection
detect:
exclude_packages: [wheel, setuptools, pip]
include_dev: false
# Hybrid resolution preferences
resolve:
strategy: hybrid # conda for ML/scientific, pip for web
prefer_conda: [numpy, scipy, pandas, tensorflow]
prefer_pip: [flask, django, fastapi, requests]
# Docker optimization
docker:
base_image: python:3.11-slim
multi_stage: true
optimize_layers: true
๐ฏ Use Cases
๐งช Data Scientists
# Perfect for ML environments with complex dependencies
pywise_pkg venv-to-conda --name ml-project
pywise_pkg resolve tensorflow pytorch scikit-learn
๐ Web Developers
# Clean up messy Django/Flask projects
pywise_pkg detect --output clean-requirements.txt
pywise_pkg dockerize --framework django
๐ DevOps Engineers
# Standardize environments across team
pywise_pkg multi-env --environments dev test staging prod
pywise_pkg dockerize --optimize --build
๐ฆ Package Maintainers
# Generate clean dependencies for PyPI
pywise_pkg detect --format poetry --output pyproject.toml
๐๏ธ Development
git clone https://github.com/pywise_pkg/pywise_pkg.git
cd pywise_pkg
pip install -e .[dev]
pytest
๐ค Contributing
We welcome contributions! See CONTRIBUTING.md for guidelines.
๐ License
MIT License - see LICENSE file.
๐ Acknowledgments
- Built on excellent Python packaging ecosystem
- Inspired by conda, pip, poetry, and pipenv
- Thanks to the Python community for feedback
๐ Roadmap
- GUI interface for dependency management
- VS Code extension
- Automatic security vulnerability scanning
- AI-powered dependency optimization
- Integration with CI/CD platforms
- Support for private package repositories
โญ Star this repo if pywise_pkg helps you manage dependencies better!
Made with โค๏ธ for the Python community
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 pywise_pkg-0.2.0.tar.gz.
File metadata
- Download URL: pywise_pkg-0.2.0.tar.gz
- Upload date:
- Size: 20.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9a53d13f789a74c23ff89107b17e8f709865dc240b9e4a3cbd222bf726b15ec2
|
|
| MD5 |
a70a175611e249e9b0874ba184eb0551
|
|
| BLAKE2b-256 |
28317227781932df986b5a10b6932da1f7c8061dd83c3366e2dd4b014783fa67
|
File details
Details for the file pywise_pkg-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pywise_pkg-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.10.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
941ac5d5b26e7a0dea3b4e81f8c6fe04d73c03390473d5e1343e9b017be7de71
|
|
| MD5 |
759bb32e3a59026c40cc5b00affe7716
|
|
| BLAKE2b-256 |
9c446c136176d4674ea2bc18ae9915c809d8e7b84391a92f491fe86d2f12a2fb
|