skidl.part_query module

Functions for finding/displaying parts and footprints.

This module provides utilities to search for electronic parts and footprints across libraries, and to display their details. It includes support for regular expression searches and filtering on different properties.

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

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

Searches through all available libraries for parts matching the given terms and prints the results to the console.

Parameters:
  • terms (str) – Space-separated search terms to match against part attributes.

  • tool (str, optional) – The ECAD tool format for the libraries to search. Defaults to the currently configured tool.

Returns:

Results are printed to the console.

Return type:

None

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

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

Searches through all available footprint libraries for footprints matching the given terms and prints the results to the console.

Parameters:
  • terms (str) – Space-separated search terms to match against footprint attributes.

  • tool (str, optional) – The ECAD tool format for the libraries to search. Defaults to the currently configured tool.

Returns:

Results are printed to the console.

Return type:

None

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

Return an iterator over footprints that match the regex terms.

This generator function yields information about libraries being searched and footprints found that match the search terms.

Parameters:
  • terms (str) – Space-separated search terms to match against footprint attributes.

  • tool (str, optional) – The ECAD tool format for the footprint libraries to search. Defaults to the currently configured tool.

Yields:

tuple

Either progress information as (“LIB”, lib_name, index, total)

or footprint information as (“MODULE”, lib_name, module_text, module_name).

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.

Searches through all available libraries for parts matching the given terms and prints the results to the console.

Parameters:
  • terms (str) – Space-separated search terms to match against part attributes.

  • tool (str, optional) – The ECAD tool format for the libraries to search. Defaults to the currently configured tool.

Returns:

Results are printed to the console.

Return type:

None

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

Return an iterator of (lib, part) sequences that match regex terms.

This generator function yields information about libraries being searched and parts found that match the search terms.

Parameters:
  • terms (str) – Space-separated search terms to match against part attributes.

  • tool (str, optional) – The ECAD tool format for the libraries to search. Defaults to the currently configured tool.

Yields:

tuple

Either progress information as (“LIB”, lib_file, index, total)

or part information as (“PART”, lib_file, part_obj, part_alias).

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

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

Creates a template Part object that can be inspected to see its pins and properties.

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

  • part_name (str) – The name of the part in the library.

  • tool (str, optional) – The ECAD tool format for the library. Defaults to the currently configured tool.

Returns:

A template Part object if found, otherwise None.

Return type:

Part

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

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

Creates a template Part object that can be inspected to see its pins and properties.

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

  • part_name (str) – The name of the part in the library.

  • tool (str, optional) – The ECAD tool format for the library. Defaults to the currently configured tool.

Returns:

A template Part object if found, otherwise None.

Return type:

Part