Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pywise_pkg-0.2.0.tar.gz (20.7 kB view details)

Uploaded Source

Built Distribution

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

pywise_pkg-0.2.0-py3-none-any.whl (21.4 kB view details)

Uploaded Python 3

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

Hashes for pywise_pkg-0.2.0.tar.gz
Algorithm Hash digest
SHA256 9a53d13f789a74c23ff89107b17e8f709865dc240b9e4a3cbd222bf726b15ec2
MD5 a70a175611e249e9b0874ba184eb0551
BLAKE2b-256 28317227781932df986b5a10b6932da1f7c8061dd83c3366e2dd4b014783fa67

See more details on using hashes here.

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

Hashes for pywise_pkg-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 941ac5d5b26e7a0dea3b4e81f8c6fe04d73c03390473d5e1343e9b017be7de71
MD5 759bb32e3a59026c40cc5b00affe7716
BLAKE2b-256 9c446c136176d4674ea2bc18ae9915c809d8e7b84391a92f491fe86d2f12a2fb

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