find_documents#

dscat.queries.find_documents(cat, name, dataset, version, all_versions)[source]#

Find documentation files whose title or path contains every token in name.

Splitting name on whitespace lets Welcome Packet match ..._Welcome_Packet... across separator differences in file names.

Parameters:
  • cat (dscat.index.Catalogue) – Open catalogue to read from.

  • name (str) – Whitespace-separated tokens that must all appear in the title or path.

  • dataset (str or None) – Restrict to one dataset.

  • version (str or None) – Pin a version (needs dataset); the default scope is the latest.

  • all_versions (bool) – Cover every version instead of only the latest.

Returns:

Matching document rows.

Return type:

collections.abc.Sequence of sqlalchemy.engine.RowMapping