Skip to main content

Import electronic part data (LCSC, KiCad, EasyEDA) and convert to JITX component code

Project description

parts2jitx

Import electronic part data and convert it to JITX Python component code.

Supports LCSC/EasyEDA part lookup and KiCad footprint conversion.

Install

pip install parts2jitx

CLI Tools

parts2jitx-lcsc

Look up LCSC/JLCPCB parts: real-time stock, pricing, datasheet URLs, and KiCad footprint download via EasyEDA.

# Check stock and pricing
parts2jitx-lcsc C165948

# Download KiCad footprint
parts2jitx-lcsc C165948 --footprint -o usb_c.kicad_mod

# Get pinout data
parts2jitx-lcsc C165948 --pinout

# Everything at once (JSON output)
parts2jitx-lcsc C165948 --all -o usb_c.kicad_mod --json

parts2jitx-kicad

Convert KiCad .kicad_mod footprint files to JITX Python component code. Works with any .kicad_mod file — not just ones from LCSC/EasyEDA.

# Basic conversion
parts2jitx-kicad footprint.kicad_mod

# With metadata
parts2jitx-kicad footprint.kicad_mod \
    --class-name USB_C_16P \
    --manufacturer "Molex" \
    --mpn "2012670005" \
    -o components/connectors/molex_2012670005.py

# From stdin
echo '(footprint ...)' | parts2jitx-kicad --stdin

# Debug: dump parsed pad data as JSON
parts2jitx-kicad footprint.kicad_mod --dump-pads

Full pipeline example

# 1. Download footprint from LCSC
parts2jitx-lcsc C165948 --footprint -o kicad_footprints/usb_c.kicad_mod

# 2. Convert to JITX component
parts2jitx-kicad kicad_footprints/usb_c.kicad_mod \
    --class-name USB_C_16P \
    --manufacturer "Korean Hroparts Elec" \
    --mpn "TYPE-C-31-M-12" \
    -o src/components/connectors/usb_c_16p.py

Python API

from parts2jitx.lcsc_lookup import lcsc_stock, get_footprint, get_pinout

# Stock and pricing
info = lcsc_stock("C165948")
print(info["mpn"], info["stock"], info["prices"])

# Download footprint
kicad_content = get_footprint("C165948", output_path="usb_c.kicad_mod")

# Get pinout
pins = get_pinout("C165948")
for pin in pins:
    print(pin["number"], pin["name"])

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

parts2jitx-0.2.0.tar.gz (28.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

parts2jitx-0.2.0-py3-none-any.whl (22.4 kB view details)

Uploaded Python 3

File details

Details for the file parts2jitx-0.2.0.tar.gz.

File metadata

  • Download URL: parts2jitx-0.2.0.tar.gz
  • Upload date:
  • Size: 28.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for parts2jitx-0.2.0.tar.gz
Algorithm Hash digest
SHA256 962b43be0b937c34cb6c52917fe2884e932c6814e7c86f6fa0c56deff3576136
MD5 9134460a23f6dec4a0cfe9932bfe14bc
BLAKE2b-256 20127d8e5a84a544b796b813be1560439ad0f99c42acb3ebe6d795c013bcb401

See more details on using hashes here.

File details

Details for the file parts2jitx-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: parts2jitx-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 22.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.1

File hashes

Hashes for parts2jitx-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 90a679ca67bb5dacab103a7d9f23698aa7d8f7d5a724a92fc5702dddf222a3c0
MD5 67a13a0e071a6821766d95a3dc91306a
BLAKE2b-256 e36e0262f94c6534da6817973f08de774565c936e88ef33dbc8ca47c8edc119c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page