Metadata-Version: 2.4
Name: energy-dependency-inspector
Version: 0.2.0
Summary: Captures dependency snapshots of software systems for tracking changes across measurements. Originally designed for energy measurement contexts, also usable as a general-purpose dependency resolver.
Author: Green Coding Solutions
License: MIT
Project-URL: Repository, https://github.com/green-coding-solutions/energy-dependency-inspector
Keywords: dependencies,docker,containers,package-manager,energy,inspection,snapshot,resolver
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: System Administrators
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Systems Administration
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: Utilities
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: docker>=6.0.0
Provides-Extra: dev
Requires-Dist: pytest>=7.0.0; extra == "dev"
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
Requires-Dist: pylint>=2.15.0; extra == "dev"
Requires-Dist: mypy>=1.0.0; extra == "dev"
Requires-Dist: types-docker; extra == "dev"
Requires-Dist: black>=22.0.0; extra == "dev"
Requires-Dist: pre-commit>=3.0.0; extra == "dev"
Dynamic: license-file

# Energy Dependency Inspector

A tool for capturing dependency snapshots of running systems by querying their package managers directly. Unlike filesystem-scanning approaches, it inspects the actual installed state of packages as reported by the system's package management tools. Originally designed to reveal relevant changes when conducting energy measurements, it can also be used as a general-purpose dependency resolver. By tracking installed packages and their versions, you can identify whether changes in performance, energy consumption, or behavior are due to code modifications or dependency updates.

The tool provides both a command-line interface and a Python library for programmatic use. It supports dependency inspection of Docker containers and host systems, outputting structured JSON with package information, versions, and unique hash values.

## Installation

```bash
git clone https://github.com/green-coding-solutions/energy-dependency-inspector
cd energy-dependency-inspector
pip install .
```

## Quick Start

```bash
# Analyze host system
python3 -m energy_dependency_inspector

# Analyze Docker container
python3 -m energy_dependency_inspector docker nginx

# Pretty print output
python3 -m energy_dependency_inspector --pretty-print

# Get help with all options
python3 -m energy_dependency_inspector -h
```

## Supported Package Managers

- **apt/dpkg** - System packages Ubuntu/Debian
- **apk** - System packages of Alpine
- **pip** - Python packages
- **npm** - Node.js packages
- **maven** - Java packages

Also captures **Docker container metadata** when analyzing containers.

## Usage Options

### Command Line Interface

For terminal usage with full control over options and environments.

### Programmatic Interface

Use as a Python library in other projects:

```python
import energy_dependency_inspector

# Analyze host system
deps = energy_dependency_inspector.resolve_host_dependencies()

# Analyze Docker container
docker_deps = energy_dependency_inspector.resolve_docker_dependencies("nginx")
```

## Documentation

- **[Quick Start Guide](./docs/guides/quick-start.md)** - Get up and running
- **[CLI Usage Guide](./docs/usage/cli-guide.md)** - Complete command line reference
- **[Python API Guide](./docs/usage/programmatic-api.md)** - Programmatic usage
- **[Output Format Guide](./docs/usage/output-format.md)** - Understanding the JSON results
- **[Troubleshooting](./docs/guides/troubleshooting.md)** - Common issues and solutions
- **[Technical Documentation](./docs/technical/)** - Architecture and implementation details

## Contributing

For development setup, contribution guidelines, and information about running tests and code quality checks, please see [CONTRIBUTING.md](./CONTRIBUTING.md).

## Requirements and Design

See the complete [SPECIFICATION.md](./SPECIFICATION.md) for detailed requirements and implementation constraints.
