Metadata-Version: 2.4
Name: ud-resolver
Version: 1.3.1
Summary: Cross-ecosystem dependency resolver — PyPI, npm, Cargo, Conda, Maven, Go, and more
Author-email: Mohammad Zeeshan <zeeshansayfyebusiness@gmail.com>
License: MIT
Project-URL: Homepage, https://github.com/code-with-zeeshan/universal-dependency-resolver
Project-URL: Repository, https://github.com/code-with-zeeshan/universal-dependency-resolver
Project-URL: Documentation, https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/docs/CLI.md
Project-URL: Changelog, https://github.com/code-with-zeeshan/universal-dependency-resolver/releases
Project-URL: Bug Tracker, https://github.com/code-with-zeeshan/universal-dependency-resolver/issues
Keywords: dependency-resolver,package-manager,cross-ecosystem,python,npm,cargo,conda,maven,cuda,compatibility,lockfile,sat-solver,dev-tools
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Natural Language :: English
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Topic :: Software Development :: Build Tools
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Software Distribution
Requires-Python: <4.0,>=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: fastapi<0.137,>=0.115.0
Requires-Dist: uvicorn<0.50,>=0.24
Requires-Dist: pydantic<3,>=2.5.0
Requires-Dist: aiohttp<4,>=3.9
Requires-Dist: beautifulsoup4<5,>=4.12
Requires-Dist: packaging<27,>=23.2
Requires-Dist: pyyaml<7,>=6.0.1
Requires-Dist: networkx<4,>=3.2.1
Requires-Dist: z3-solver<4.15.5,>=4.12
Requires-Dist: sqlalchemy<3,>=2.0.23
Requires-Dist: rich<14,>=13.7
Requires-Dist: slowapi<1,>=0.1.9
Requires-Dist: python-multipart<1,>=0.0.6
Requires-Dist: jinja2<4,>=3.1.2
Requires-Dist: structlog<25,>=24.1
Requires-Dist: prometheus-fastapi-instrumentator<7,>=6.1
Requires-Dist: python-jose[cryptography]<4,>=3.3
Requires-Dist: passlib[bcrypt]<2,>=1.7.4
Requires-Dist: bcrypt<5
Provides-Extra: system
Requires-Dist: psutil<6,>=5.9.6; extra == "system"
Requires-Dist: py-cpuinfo<10,>=9.0; extra == "system"
Requires-Dist: distro<2,>=1.8; extra == "system"
Requires-Dist: gputil<2,>=1.4; extra == "system"
Requires-Dist: nvidia-ml-py<13,>=12.535; extra == "system"
Requires-Dist: email-validator<3,>=2.1; extra == "system"
Provides-Extra: dev
Requires-Dist: pytest<8,>=7.4; extra == "dev"
Requires-Dist: pytest-asyncio<1,>=0.21; extra == "dev"
Requires-Dist: pytest-cov<6,>=4.1; extra == "dev"
Requires-Dist: httpx<1,>=0.25; extra == "dev"
Requires-Dist: ruff<1,>=0.6; extra == "dev"
Requires-Dist: mypy<2,>=1.7; extra == "dev"
Requires-Dist: email-validator<3,>=2.1; extra == "dev"
Provides-Extra: postgres
Requires-Dist: psycopg2-binary<3,>=2.9.9; extra == "postgres"
Requires-Dist: redis<6,>=5.0.1; extra == "postgres"
Requires-Dist: celery<6,>=5.3.4; extra == "postgres"
Requires-Dist: aiocache<1,>=0.12.2; extra == "postgres"
Provides-Extra: monitoring
Requires-Dist: opentelemetry-api<2,>=1.22; extra == "monitoring"
Requires-Dist: opentelemetry-sdk<2,>=1.22; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-fastapi>=0.43b0; extra == "monitoring"
Requires-Dist: opentelemetry-instrumentation-httpx>=0.43b0; extra == "monitoring"
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.22; extra == "monitoring"
Requires-Dist: sentry-sdk[fastapi]<2,>=1.39; extra == "monitoring"
Requires-Dist: python-socketio<6,>=5.11; extra == "monitoring"
Requires-Dist: prometheus-client<1,>=0.19; extra == "monitoring"
Provides-Extra: all
Requires-Dist: psutil<6,>=5.9.6; extra == "all"
Requires-Dist: py-cpuinfo<10,>=9.0; extra == "all"
Requires-Dist: gputil<2,>=1.4; extra == "all"
Requires-Dist: wmi<2,>=1.5.1; platform_system == "Windows" and extra == "all"
Requires-Dist: httpx<1,>=0.26; extra == "all"
Requires-Dist: asyncpg<1,>=0.29; extra == "all"
Requires-Dist: psycopg2-binary<3,>=2.9; extra == "all"
Requires-Dist: sqlalchemy[asyncio]<3,>=2.0.23; extra == "all"
Requires-Dist: redis[hiredis]<6,>=5.0; extra == "all"
Requires-Dist: celery[redis]<6,>=5.3; extra == "all"
Requires-Dist: flower<3,>=2.0; extra == "all"
Requires-Dist: opentelemetry-api<2,>=1.22; extra == "all"
Requires-Dist: opentelemetry-sdk<2,>=1.22; extra == "all"
Requires-Dist: opentelemetry-instrumentation<1,>=0.43b0; extra == "all"
Requires-Dist: opentelemetry-instrumentation-fastapi<1,>=0.43b0; extra == "all"
Requires-Dist: opentelemetry-instrumentation-sqlalchemy<1,>=0.43b0; extra == "all"
Requires-Dist: opentelemetry-instrumentation-httpx<1,>=0.43b0; extra == "all"
Requires-Dist: opentelemetry-exporter-otlp-proto-http<2,>=1.22; extra == "all"
Requires-Dist: sentry-sdk[fastapi]<2,>=1.39; extra == "all"
Requires-Dist: python-socketio<6,>=5.11; extra == "all"
Requires-Dist: prometheus-client<1,>=0.19; extra == "all"
Requires-Dist: email-validator<3,>=2.1; extra == "all"
Dynamic: license-file

# Universal Dependency Resolver

[![PyPI version](https://img.shields.io/pypi/v/ud-resolver?color=blue)](https://pypi.org/project/ud-resolver/)
[![Python versions](https://img.shields.io/pypi/pyversions/ud-resolver)](https://pypi.org/project/ud-resolver/)
[![License](https://img.shields.io/pypi/l/ud-resolver)](https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/LICENSE)
[![CI](https://github.com/code-with-zeeshan/universal-dependency-resolver/actions/workflows/ci.yml/badge.svg)](https://github.com/code-with-zeeshan/universal-dependency-resolver/actions/workflows/ci.yml)

Resolve dependencies across **14 ecosystems** — detect conflicts, check system compatibility, and export to any format.

```bash
# From any ecosystem, resolve together
udr resolve flask>=2.0 torch@pypi react@^18

# Lock your project's dependencies
udr lock

# Check system compatibility
udr check

# Start the API server
udr serve --port 8000
```

---

## Install

```bash
pip install ud-resolver
```

### Optional extras

| Extra | What it adds |
|---|---|
| `[system]` | GPU & system scanning (psutil, pynvml, cpuinfo) |
| `[postgres]` | PostgreSQL support |
| `[monitoring]` | OpenTelemetry, Sentry, Prometheus instrumentation |
| `[all]` | Everything above |

---

## Features

| Capability | Detail |
|---|---|
| **14 ecosystems** | PyPI, Conda, npm, Crates.io (Rust), Maven (Java), Go Modules, APT (Debian), APK (Alpine), CocoaPods, Homebrew, NuGet, Packagist, RubyGems, Pub (Dart/Flutter) |
| **SAT-solver resolution** | Z3-based conflict resolver handles complex cross-ecosystem version constraints |
| **System-aware** | Detects OS, CPU, GPU, CUDA, Python, Node.js, GCC, Java — resolution adapts to your environment |
| **GPU-aware** | Automatically selects CUDA variants (e.g. `torch 2.1.2+cu121`) when NVIDIA GPU detected |
| **12 export formats** | requirements.txt, package.json, Dockerfile, docker-compose.yml, pyproject.toml, environment.yml, Cargo.toml, build.gradle, pom.xml, CMakeLists.txt, install.sh, install.bat |
| **13 CLI commands** | serve, check, resolve, info, lock, scan, graph, verify, list-ecosystems, update, install, restore, completion |
| **24 REST API endpoints** | Full programmatic API with OpenAPI docs |
| **Desktop GUI** | Standalone Electron app — no Python or Node.js needed |
| **Zero config** | SQLite by default, in-memory cache, no Docker required |
| **Lock file** | Reproducible `udr-lock.json` with full system snapshot |

---

## Quick Start

```bash
# Resolve cross-ecosystem packages
udr resolve numpy pandas scikit-learn
udr resolve react vue -e npm
udr resolve serde tokio -e crates

# Lock a project's dependencies
udr lock
udr lock --manifest requirements.txt --dry-run

# Validate lock file
udr verify

# Show dependency tree
udr graph flask django

# Scan a GitHub repo without cloning
udr scan --github https://github.com/user/repo

# System info
udr check
udr info

# List all supported ecosystems
udr list-ecosystems
```

---

## Use as a Python Library

```python
import asyncio
from backend.core.data_aggregator import DataAggregator
from backend.core.conflict_resolver import ConflictResolver
from backend.core.system_scanner import SystemScanner

async def main():
    scanner = SystemScanner()
    system_info = await scanner.scan_all()

    aggregator = DataAggregator()
    info = await aggregator.get_package_info(
        "torch", ecosystem="pypi",
        include_dependencies=True, include_versions=True,
    )

    resolver = ConflictResolver()
    result = resolver.resolve(
        [{"name": "flask", "version": ">=2.0"}],
        system_info=system_info,
    )

asyncio.run(main())
```

---

## How It Works

```
Your request ──► Fetch metadata from registry APIs
                      │
                      ▼
              Scan target system (OS, GPU, CUDA, runtimes)
                      │
                      ▼
              Resolve conflicts with Z3 SAT solver
                      │
                      ▼
              Export to 12 formats or write lock file
```

---

## Links

- [GitHub](https://github.com/code-with-zeeshan/universal-dependency-resolver) — source, issues, releases
- [CLI Reference](https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/docs/CLI.md)
- [Architecture](https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/docs/ARCHITECTURE.md)
- [API Docs](https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/docs/API.md)
- [Changelog](https://github.com/code-with-zeeshan/universal-dependency-resolver/releases)
- [License: MIT](https://github.com/code-with-zeeshan/universal-dependency-resolver/blob/main/LICENSE)
