Skip to main content

Supply Chain Monkey

          ▓▓▓▓▓▓▓▓▓▓
        ▓▓▓▓▓▓▓▓▓▓▓▓▓▓
      ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
    ▓▓▓▓░░░░░░▓▓░░░░░░▓▓▓▓
░░░░▓▓░░░░░░░░░░░░░░░░░░▓▓░░░░
░░░░▓▓░░██  ░░░░░░██  ░░▓▓░░░░
  ░░▓▓░░████░░░░░░████░░▓▓░░
    ▓▓░░░░░░░░░░░░░░░░░░▓▓
      ▓▓░░░░░░░░░░░░░░▓▓
        ▓▓▓▓░░░░░░▓▓▓▓
            ▓▓▓▓▓▓          ░░
          ▓▓▓▓▓▓▓▓▓▓      ▓▓
          ▓▓▓▓▓▓▓▓▓▓    ▓▓▓▓
        ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
        ▓▓▓▓░░▓▓░░▓▓▓▓

Internal service for querying electronic component suppliers. It provides a unified HTTP API that centralizes vendor credentials and provider routing.

Status

2026.8.12 - explicit provider failure diagnostics in the API and status page, including retryability and sanitized upstream context.

The PyPI distribution is supply-chain-monkey. The Python import package is scm.

Architecture

The repo contains three layers:

  • scm.models: shared contract with Pydantic models, enums, and supplier constants.
  • scm.client: HTTP client library for consumers.
  • scm.server: FastAPI server with provider adapters and the status page.

Providers

Supplier Backend Credentials Required
JLCPCB Hybrid official API plus scraper Optional; scraper works without credentials
LCSC Internal JSON API None
Digikey Official REST API v4 OAuth2 Yes
Mouser Official REST API v1 Yes

API

All endpoints except health require a bearer token.

GET  /v1/health
GET  /v1/providers/status
GET  /v1/search?supplier=jlcpcb&mpn=TPS543620RPYR
GET  /v1/detail?supplier=jlcpcb&part=C2870085
GET  /v1/spn?supplier=jlcpcb&spn=C2870085
POST /v1/spn/batch
GET  /v1/search/stream?mpn=X&token=Y

The streaming endpoint pushes results per provider as they complete via Server-Sent Events. It supports max_results and per-provider timeout.

The root URL serves a status page with an interactive test panel.

Client Library

Install the consumer client from PyPI:

python -m pip install "supply-chain-monkey[client]==2026.8.12"
from scm.client import SCMClient
from scm.models import PARAMETER_FIELD_NAMES, SUPPLIERS, SupplierType

client = SCMClient(url="https://your-scm.example.com", token="...")

result = client.search("jlcpcb", "TPS543620RPYR")
all_results = client.search_all("TPS543620RPYR")
detail = client.detail("jlcpcb", "C2870085")
print(SUPPLIERS)

Local Development

cp .env.template .env
# fill in SCM_SERVICE_TOKEN and any provider credentials

uv sync --group dev
PYTHONPATH=src/py uv run uvicorn scm.server.main:app --reload --env-file .env

Testing

uv run pytest -q
uv run rack run L99_signoff
uv run python tests/scripts/scm_test_cli.py --token YOUR_TOKEN
uv run python tests/scripts/scm_test_cli.py --url https://your-scm.example.com --token YOUR_TOKEN

Deployment

The included appliku.yml uses Appliku's managed python-3.13-uv build image. Pushing production can trigger deployment.

git checkout dev
# merge through PRs; do not develop directly on production

pyproject.toml must keep [tool.uv] package = false and default-groups = []. The Dockerfile is inactive unless appliku.yml changes to build_image: dockerfile. See CLAUDE.md for deployment constraints.

dev is the integration branch. main is the public source branch. production is the Wavenumber deployment branch and must be updated only by protected PR/merge flow.

Consumer Integration

Consumers should depend on the supply-chain-monkey[client] distribution and import scm. Configure service URL and token outside source control.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

supply_chain_monkey-2026.8.12.tar.gz (642.4 kB view details)

Uploaded Source

Built Distribution

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

supply_chain_monkey-2026.8.12-py3-none-any.whl (67.1 kB view details)

Uploaded Python 3

File details

Details for the file supply_chain_monkey-2026.8.12.tar.gz.

File metadata

  • Download URL: supply_chain_monkey-2026.8.12.tar.gz
  • Upload date:
  • Size: 642.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for supply_chain_monkey-2026.8.12.tar.gz
Algorithm Hash digest
SHA256 d3cc7e21fa0148ed0503b5e7ac92cb9c737d80e4685f874b052fd3edbeb1b53e
MD5 90e4f8b095f2aadeab4672cb53c4dc25
BLAKE2b-256 3f5c546ee8b40fa272c632219fe8a47f844f9b52489f5de77639b4705cf8127f

See more details on using hashes here.

Provenance

The following attestation bundles were made for supply_chain_monkey-2026.8.12.tar.gz:

Publisher: release.yml on wavenumber-eng/supply-chain-monkey

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

File details

Details for the file supply_chain_monkey-2026.8.12-py3-none-any.whl.

File metadata

File hashes

Hashes for supply_chain_monkey-2026.8.12-py3-none-any.whl
Algorithm Hash digest
SHA256 3bbe6c4de579375a38d0679329c11fe0a65faa441552eade86c684a946ad02a0
MD5 2f7f6b551806a29f84b0fbba71b01dfb
BLAKE2b-256 7be7ec379d1a887eb918c979266808c592507d1b27f858dd95164b340ced0e2a

See more details on using hashes here.

Provenance

The following attestation bundles were made for supply_chain_monkey-2026.8.12-py3-none-any.whl:

Publisher: release.yml on wavenumber-eng/supply-chain-monkey

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 Sentry Error logging StatusPage Status page