1
0
mirror of https://github.com/home-assistant/core.git synced 2025-05-15 03:19:15 +00:00
core/script/hassfest/manifest_helper.py

14 lines
364 B
Python

"""Helpers to deal with manifests."""
import json
import pathlib
component_dir = pathlib.Path("homeassistant/components")
def iter_manifests():
"""Iterate over all available manifests."""
manifests = [
json.loads(fil.read_text()) for fil in component_dir.glob("*/manifest.json")
]
return sorted(manifests, key=lambda man: man["domain"])