skidl.part_query module

Functions for finding/displaying parts and footprints.

class skidl.part_query.FootprintCache(*args, **kwargs)[source]

Bases: dict

Dict for storing footprints from all directories.

load(path)[source]

Load cache with footprints from libraries in fp-lib-table file.

reset()[source]
skidl.part_query.parse_search_terms(terms)[source]

Return a regular expression for a sequence of search terms.

Substitute a zero-width lookahead assertion (?= ) for each term. Thus, the “abc def” would become “(?=.*(abc))(?=.*(def))” and would match any string containing both “abc” and “def”. Or “abc (def|ghi)” would become “(?=.*(abc))((?=.*(def|ghi))” and would match any string containing “abc” and “def” or “ghi”. Quoted terms can be used for phrases containing whitespace.

skidl.part_query.search(terms, tool=None)

Print a list of parts with the regex terms within their name, alias, description or keywords.

skidl.part_query.search_footprints(terms, tool=None)[source]

Print a list of footprints with the regex term within their description/tags.

skidl.part_query.search_footprints_iter(terms, tool=None)[source]

Return a list of (lib, footprint) sequences that match a regex term.

skidl.part_query.search_parts(terms, tool=None)[source]

Print a list of parts with the regex terms within their name, alias, description or keywords.

skidl.part_query.search_parts_iter(terms, tool=None)[source]

Return a list of (lib, part) sequences that match a regex term.

skidl.part_query.show(lib, part_name, tool=None)

Print the I/O pins for a given part in a library.

Parameters
  • lib – Either a SchLib object or the name of a library.

  • part_name – The name of the part in the library.

  • tool – The ECAD tool format for the library.

Returns

A Part object.

skidl.part_query.show_footprint(lib, module_name, tool=None)[source]

Print the pads for a given module in a library.

Parameters
  • lib – The name of a library.

  • module_name – The name of the footprint in the library.

  • tool – The ECAD tool format for the library.

Returns

A Part object.

skidl.part_query.show_part(lib, part_name, tool=None)[source]

Print the I/O pins for a given part in a library.

Parameters
  • lib – Either a SchLib object or the name of a library.

  • part_name – The name of the part in the library.

  • tool – The ECAD tool format for the library.

Returns

A Part object.