Given this folder that contains subfolders folders, each with one Chart.yaml
file, find all the unique values of annotations.category
field and return the count of each value.
find_unique_categories("./charts/bitnami")
The output should look like:
{ "Infrastructure": 23, "some_other_category": 44, .... }
- Clone the https://github.com/bitnami/charts repository into the folder for your project and run your script to read from the charts/bitnami folder.
- You can use https://pyyaml.org/wiki/PyYAMLDocumentation to work with yaml files in python