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.
Project description
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
From PyPI:
pip install energy-dependency-inspector
From source:
git clone https://github.com/green-coding-solutions/energy-dependency-inspector
cd energy-dependency-inspector
pip install .
Quick Start
# 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:
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 - Get up and running
- CLI Usage Guide - Complete command line reference
- Python API Guide - Programmatic usage
- Output Format Guide - Understanding the JSON results
- Troubleshooting - Common issues and solutions
- Technical Documentation - Architecture and implementation details
Contributing
For development setup, contribution guidelines, and information about running tests and code quality checks, please see CONTRIBUTING.md.
Requirements and Design
See the complete SPECIFICATION.md for detailed requirements and implementation constraints.
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
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 energy_dependency_inspector-0.3.0.tar.gz.
File metadata
- Download URL: energy_dependency_inspector-0.3.0.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9d6e6f28e662a7c468979419e20ab9cde1d060821728c0d3bdf1ac506f5e633
|
|
| MD5 |
0ef3b58366b5f8b2ec3a8391ed4fa94d
|
|
| BLAKE2b-256 |
d52fa9b0e4d1dfd3cf6ba2f17b10f560c4d104e2a94e5748366722e52d47b0dd
|
File details
Details for the file energy_dependency_inspector-0.3.0-py3-none-any.whl.
File metadata
- Download URL: energy_dependency_inspector-0.3.0-py3-none-any.whl
- Upload date:
- Size: 31.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fbe71dd0b2ce5b9839b5e07267a7e274eef56a0bc5b78d19b26486d24327f50
|
|
| MD5 |
05ee96060981b6a8e72c0dfbb145eefe
|
|
| BLAKE2b-256 |
6c7a78a9abe7ce790b0ea8243595acacee916bc57f746e8e4022ff16cdd83271
|