warecache is launching on Crowd Supply. Sign up for launch updates →

Distributor Plugins

Small Python scripts that run inside the server and keep pricing, lifecycle, and part details in step with your suppliers.

Included with the server

Every supplier has a different API, a different rate limit, and a different idea of what a part number looks like. Plugins keep all of that out of the core. Each plugin is a folder with one Python file and, if the supplier needs it, a credentials file. The server discovers them, runs them on a schedule, and writes what they return into your inventory.

What a Plugin Does

Resolves Part Numbers

Given your parts, by manufacturer and manufacturer part number, the plugin finds the supplier's own part number for each one. From then on warecache knows how to ask that supplier about that part.

Syncs Pricing

Price breaks at each quantity tier are fetched and stored per supplier, which is what feeds the unit-cost curves in the clients and the build-cost rollup on the server.

Fills In Lifecycle and Details

Lifecycle status (production, not recommended for new designs, last time buy, obsolete) is kept current, and supplier fields are mapped onto your custom fields. Values you have already entered are never overwritten.

How the Server Runs Them

  • Plugins are discovered from a directory at startup; a distributor record is created for each
  • Each runs on its own interval, once a day by default, or on demand from the clients
  • Large catalogs are worked through in batches across cycles, so rate limits are respected and every part gets covered
  • Changes to a plugin file are picked up without a restart; a broken edit keeps the last working version
  • A plugin that fails is disabled on its own; the others keep running
  • Plugin log output appears alongside the server's own logs

Writing Your Own

A plugin needs three functions: one that describes itself and which features it supports, one that initializes with its credentials, and one that resolves your part numbers to the supplier's. Pricing and part-detail functions are added only if the plugin says it supports them. An example template ships with the server.

Included Plugins

Nine suppliers today, across electronics, industrial supply, lab, and materials.

Supplier Covers Credentials Pricing Lifecycle Part Info Search
DigiKey Electronic components API account ✓ ✓ ✓ ✓
Mouser Electronic components API key ✓ ✓ ✓ ✓
McMaster-Carr Industrial supply Approved API account ✓ ✓ ✓ —
Fastenal Industrial and construction supply None ✓ — ✓ —
Fisher Scientific Lab equipment and chemicals None ✓ — ✓ ✓
Sigma-Aldrich Chemicals None ✓ — ✓ ✓
MatterHackers 3D printing materials None ✓ — ✓ ✓
Metals Depot Raw metals None ✓ — ✓ ✓
Rio Grande Jewelry parts, tools, and metals None ✓ — ✓ ✓

Suppliers marked "None" are read from public product pages and need no account. Setup steps and credential formats for each are in the plugin documentation.