class asdf.resource.DirectoryResourceMapping(root, uri_prefix, recursive=False, filename_pattern='*.yaml', stem_filename=True)[source]


Resource mapping that reads resource content from a directory or directory tree.

rootstr or

Root directory (or directory-like Traversable) of the resource files. str will be interpreted as a filesystem path.


Prefix used to construct URIs from file paths. The prefix will be prepended to paths relative to the root directory.

recursivebool, optional

If True, recurse into subdirectories. Defaults to False.

filename_patternstr, optional

Glob pattern that identifies relevant filenames. Defaults to "*.yaml".

stem_filenamebool, optional

If True, remove the filename’s extension when constructing its URI.