Skip to main content

Electronic component reference database with ASCII pinout diagrams

Project description

partinfo

Datasheet-verified electronic component pinouts, specs, and ASCII diagrams in your terminal, offline.

partinfo is an offline command-line reference for electronic parts and connectors: pinouts, key specs, typical applications, and the gotchas that catch you in practice. Every entry is a hand-curated JSON file checked against a datasheet, indexed into SQLite with full-text search. 228 parts, 25 connectors, and a library of formula references ship in the package; no network needed.

Structured --json on every lookup, plus a bundled skill (below), so Claude Code or Codex query partinfo for a verified number instead of guessing a pinout (or a thermal resistance) from memory.

partinfo ne555: ASCII DIP-8 package diagram, pinout table colored by pin function, specs, and gotchas

Why

Datasheets are slow to open and pin-numbering traps are easy to forget: the BC547 is C-B-E, the 2N3904 is E-B-C; the LM317 tab is the output but the 7805 tab is ground. partinfo answers those in one command, with the package drawn in ASCII so you can wire it without opening a PDF.

Install

pip install partinfo

Usage

partinfo ne555                  # full entry
partinfo irlz44n --ascii        # ASCII package diagram
partinfo lm317 --specs          # key specs only
partinfo search "can transceiver"

# connectors & cables
partinfo conn obd-ii            # OBD-II / DB9 / USB-C / eurorack power / MIDI ...
partinfo conn gallery           # every connector diagram

# formula references
partinfo ref list               # ohms-law, rc-time-constant, mosfet-parameters, ne555-formulas ...
partinfo ref mosfet-parameters  # formulas with a variable legend

partinfo gallery                # every part diagram, to scroll
partinfo conn obd-ii --ascii: face-view ASCII diagram of the OBD-II connector

Pins are colored by function on a real terminal and drop to plain when piped or read by a script or model. Override with --color {auto,semantic,minimal,mixed,off} or NO_COLOR=1.

Use it as a Claude Code / Codex skill

partinfo ships a skill so an agent reaches for its verified data instead of recalling a pinout from training. After installing:

partinfo skill install          # copies the skill into ~/.claude/skills and/or ~/.codex/skills (asks first)

A fresh session, asked "show me the IRF520 pinout and whether it survives 3 A in still air," then runs partinfo for the diagram and the real thermal numbers and does the math, instead of guessing.

Diagrams are rendered from the pin data

The ASCII pinout is generated from the same pin table as the specs, so the picture and the data stay in sync. Supply a pre-rendered ascii string on a package only to override.

It computes, not just looks up

Each part stores its calculation inputs (rds_on_ohm, rth_ja_cw, ...) and the reference library stores the formulas, so a question gets answered from verified numbers. For "is an IRF520 safe switching 3 A in still air?", partinfo supplies Rds(on) = 0.27 Ω and Rth(JA) = 62 °C/W; applying P = I²·R and Tj = Ta + P·Rth(JA) gives Tj ≈ 176 °C, over the limit. The 9 A on the datasheet front page is a rating that needs a heatsink, and one formula shows it. --json hands the field names straight to a formula's variables.

partinfo irf520 --ascii --specs: TO-220 package diagram alongside the Rds(on) and Rth(JA) values the thermal math needs

Data model

Each part is one JSON file validated by a Pydantic schema: packages (pins with number, name, type, description), specs, gotchas, related, datasheet_url. Connectors and references use the same approach, so every entry is structurally identical and diagrams render from the pin data. Add a part by dropping a JSON file in its category folder and running partinfo ingest.

The JSON ships inside the package; the SQLite index is a derived cache at ~/.local/share/partinfo/parts.db, built on first use.

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

partinfo-0.1.5.tar.gz (828.6 kB view details)

Uploaded Source

Built Distribution

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

partinfo-0.1.5-py3-none-any.whl (465.3 kB view details)

Uploaded Python 3

File details

Details for the file partinfo-0.1.5.tar.gz.

File metadata

  • Download URL: partinfo-0.1.5.tar.gz
  • Upload date:
  • Size: 828.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for partinfo-0.1.5.tar.gz
Algorithm Hash digest
SHA256 2b83aa613bf4ca1ef2393b1fd231df584df978d208b6afa9e26cc99a97962e54
MD5 a14bac9b0c2162e94f6762174ed245e1
BLAKE2b-256 fd16b38ab9f7aeb73620a6b168697b3dbaaa93b0192d198ff05735d7ca27f945

See more details on using hashes here.

Provenance

The following attestation bundles were made for partinfo-0.1.5.tar.gz:

Publisher: publish.yml on hed0rah/partinfo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file partinfo-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: partinfo-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 465.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for partinfo-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 2967c664bb6c3b74554d15357faaf3a9a3c40b82c9852ef1ba9ca9db19461fd7
MD5 5582b08adcc10a1316140e8c7b7e6fd4
BLAKE2b-256 16e2af81e69a5870d80649b4d33f45bb3235df73d1bb0411ff1a2bff2a71cd73

See more details on using hashes here.

Provenance

The following attestation bundles were made for partinfo-0.1.5-py3-none-any.whl:

Publisher: publish.yml on hed0rah/partinfo

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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