from jsonschema import validate
import yaml
schema = """
type: object
properties:
  testing:
    type: array
    items:
      enum:
        - this
        - is
        - a
        - test
"""
Проверка документа yaml в python