CLI command design
download-part
Fetch one EasyEDA / LCSC component API response by C-number and write a local bundle containing raw JSON, summary JSON, 3D model metadata, and requested 3D model files.
Usage
easyeda-monkey download-part C21190
easyeda-monkey download-part 21190 --output-dir parts
easyeda-monkey download-part C21190 --model-format step --cache-dir .cache/easyeda
Arguments
| Name | Required | Meaning |
|---|---|---|
lcsc_id |
Yes | LCSC C-number. The command accepts either C21190 or 21190. |
-o, --output-dir |
No | Output root directory. The command writes into <output-dir>/<LCSC_ID>/. Default is output. |
--cache-dir |
No | Directory for cached raw API responses. A matching cache file avoids live API access. |
--model-format |
No | One of both, step, obj, or none. Default is both. |
--timeout |
No | HTTP timeout in seconds for live API requests and 3D model downloads. |
--rate-limit-seconds |
No | Minimum delay between live API requests made by this process. |
Output
The default output directory is output/C21190/ for part
C21190. The bundle is intentionally file-oriented so users
can inspect the raw API data and the downloaded model files without
writing Python.
| Path | Meaning |
|---|---|
easyeda-api.json |
Raw EasyEDA / LCSC API response. |
summary.json |
Compact summary with symbol, footprint, and 3D-model counts. |
3d-models.json |
Extracted 3D model references and source URLs. |
models/<uuid>.step |
Downloaded STEP model when requested. |
models/<uuid>.obj |
Downloaded OBJ model when requested. |
download-report.json |
Machine-readable report listing output paths and download success. |
Config And Contracts
This command has no config file. Its JSON report is useful for automation, but it is not yet promoted to a stable output contract.
Tests
- CLI tests use cached EasyEDA API fixtures and mocked model downloads.
- Signoff checks that this document exists and is indexed for the registered command.
- Release tests verify the command module is separate from the top-level CLI orchestrator.