commands module#

Commands for interacting with the JITX parts database.

This module provides functions for communicating with the JITX parts database.

get_design_name()[source]#
Return type:

str | None

dbquery(args, limit=1000, skip_cache=False)[source]#

Query the JITX parts database.

The function automatically categorizes arguments by their type to be sent to the server:
  • int-args: tuple[tuple[str, int], …]

  • double-args: tuple[tuple[str, float], …]

  • string-args: tuple[tuple[str, str], …]

  • tuple-double-args: tuple[tuple[str, tuple[float, …]], …]

  • tuple-string-args: tuple[tuple[str, tuple[str, …]], …]

The function also passes the following parameters along to the server:
  • limit: int

  • skip_cache: bool

Parameters:
Return type:

Sequence[dict[str, Mapping[str, Mapping[str, JSON] | Sequence[JSON] | str | int | float | bool | None] | Sequence[Mapping[str, JSON] | Sequence[JSON] | str | int | float | bool | None] | str | int | float | bool | None]]

Returns:

A list of matching components

download_model3d(filepath)[source]#

Download a model 3D file from the JITX parts database.

Parameters:

filepath (str) – The path to the model 3D file

Return type:

None