Skip to content

Instantly share code, notes, and snippets.

package iap
import (
"context"
"fmt"
"io"
"net/http"
"strings"
"time"
)
@dlactin
dlactin / unifiedReports.py
Created October 31, 2025 22:46
Unified reports test
"""
Iterate through a directory of yaml and json files that define http endpoints and fields that we need to query for a unified report.
Query the defined endpoints and normalize the data with a common schema (not provided).
Output the normalized data to json/yaml for consumption by other tooling.
Ensure the directory is provided via a command line parameter and an appropriate exit code after the report is unified. (error if the report exceeds *threshold*, success if under *threshold*)
Bonus:
- Make sure we check if the directory exists and strip the parsed values of any whitespace
- Post the unified report to another http endpoint
- Add a parsed=true field to the reports in the data directory and exclude any reports with parsed=true
name: Latest Docker Image
sources:
ha:
name: "Home Assistant Test"
kind: dockerimage
spec:
image: "homeassistant/home-assistant"
versionfilter:
kind: regex