Use the 'resource' pattern for PyYAML