The easiest and purest method without relying on C headers is PyYaml (documentation), which can be installed via pip install pyyaml:
with open("example.yaml", 'r') as stream:
except yaml.YAMLError as exc:
And that's it. A plain yaml.load() function also exists, but yaml.safe_load() should always be preferred unless you explicitly need the arbitrary object serialization/deserialization provided in order to avoid introducing the possibility for arbitrary code execution.
Note the PyYaml project supports versions up through the YAML 1.1 specification. If YAML 1.2 specification support is needed, see ruamel.yaml as noted in this answer.