Skip to main content

Energy Dependency Inspector

PyPI

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
  • composer - PHP packages
  • pecl - PHP extensions
  • 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

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.

Metadata

Release files for energy-dependency-inspector 0.5.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for energy-dependency-inspector 0.5.1
File Size Uploaded Provenance
energy_dependency_inspector-0.5.1.tar.gz 24.2 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for energy-dependency-inspector 0.5.1
File Interpreter ABI Platform
energy_dependency_inspector-0.5.1-py3-none-any.whl Python 3 none any Details

Total release size: 58.9 kB

Release files / energy_dependency_inspector-0.5.1.tar.gz

Download URL energy_dependency_inspector-0.5.1.tar.gz
Size 24.2 kB
Tags Source
SHA-256 checksum
How to use checksums
c5c5ee0299b3339035c8b1994c982ca5c6a668b0c5ad97579253d6f61822e43e
BLAKE2b-256 checksum
How to use checksums
90f5d31c6f354d7ea0e70971b2d5f5c3d3a6c300057206be908e9d9b54597531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / energy_dependency_inspector-0.5.1-py3-none-any.whl

Download URL energy_dependency_inspector-0.5.1-py3-none-any.whl
Size 34.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ae675795386f644924f9ae98b72688e3e1106e53532a26a83f118d2227cc1990
BLAKE2b-256 checksum
How to use checksums
ec5a9db9df2b8de1027e3f94b333a191d944023ea13ae0c7babbfe2c4993c3ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for energy-dependency-inspector 0.5.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page