I was late to the party, but I did not find a way to do this in pure Python, as the YAML files created by OpenCV (YAML 1.0) are not fully compatible, and are not easily readable with the YAML libraries available in Python (YAML 1.1).
Python / OpenCV links exist, but this is just a bunch of C methods with absolutely no documentation, so at the moment they are almost unusable.
However, writing a small C extension and wrapping it in a class was pretty easy to do, so I suggest you try it. If you (or anyone else) still need it, I may be able to release the code for the small module that I wrote, I will ask for it to work on Friday.
To give you some ideas, here is how I use my module:
with FileStorage("my/file.yml") as fs: print(fs["string"])
source share