Standalone scripts that talk to Foudra through its API. Standard-library Python, an API key in the environment:
export FOUDRA_URL=https://yourcompany.foudra.com
export FOUDRA_API_KEY=fdr_… # made under API keys, by an admin
Refer to the developer manual
| File | What it is |
|---|---|
foudra.py |
The client the scripts share: the key, paging, multipart uploads, streamed downloads, Foudra's error messages, retrying only what is safe to retry. Copy it beside a new script. |
sync-prints.py |
Reconciles a directory of sliced prints (the .bgcode + .json sidecars that the print manager's slice.sh writes, and png/ renders) with the printed-parts category: creates missing parts with their G-code entry, keeps the filament BOM line at the sidecar's weight, ensures a single Print step in the printer group, uploads the render once. --dry-run first. |
import-digikey.py |
Reads DigiKey order exports, either layout DigiKey has used (the header row says which). Lines already mapped in sourcing get their price refreshed; resistors and capacitors are matched to existing parts by the canonical name their description implies; anything else is created (category by --rule WORD=CODE on the description's first word, else --category). DigiKey is recorded as a source with their number and price. --po also raises one draft purchase order for the file, so receiving the box is a click. --dry-run first. |
Each script's --help is its manual. The API itself is documented in
the developer manual and the site's reference under The API.