CLI command design
fetch-part
Fetch one EasyEDA / LCSC component API response by C-number and emit either a compact summary or the raw API JSON.
Usage
easyeda-monkey fetch-part C21190
easyeda-monkey fetch-part 21190 --cache-dir .cache/easyeda --output C21190.summary.json
easyeda-monkey fetch-part C21190 --raw --output C21190.raw.json
Arguments
| Name | Required | Meaning |
|---|---|---|
lcsc_id |
Yes | LCSC C-number. The command accepts either C21190 or 21190. |
--cache-dir |
No | Directory for cached raw API responses. A matching cache file avoids live network access. |
--output |
No | Output JSON path. When omitted, JSON is written to stdout. |
--raw |
No | Emit the raw EasyEDA API response instead of the compact summary. |
--timeout |
No | HTTP timeout in seconds for live API requests. |
--rate-limit-seconds |
No | Minimum delay between live API requests made by this process. |
Output
The default output is a compact JSON summary intended for quick CLI inspection and tests. It is not yet a stable long-term data contract.
{
"footprint": {
"has_data": true,
"shape_count": 11
},
"found": true,
"models_3d": {
"count": 1,
"has_data": true,
"obj_urls": [
"https://modules.easyeda.com/3dmodel/..."
],
"step_urls": [
"https://modules.easyeda.com/qAxj6KHrDKw4blvCG8QJPs7Y/..."
],
"uuids": [
"..."
]
},
"lcsc_id": "C21190",
"symbol": {
"has_data": true,
"shape_count": 3
},
"title": "0603WAF1001T5E",
"uuid": "..."
}
Config And Contracts
This command has no config file. If a later command accepts JSON config, that config must have a machine-readable contract and validation tests before release.
Tests
- CLI parser and command tests run against cached package fixtures, not live network access.
- Signoff checks that this document exists and is indexed for the registered command.
- Installed-wheel tests check that the console script is available.