{"id":"wheel-availability","title":"Is there a compatible PyPI wheel for this Python and platform","description":"Lists the wheels PyPI offers for a package release and picks those compatible with a given CPython version, OS, CPU architecture and libc (glibc or musl version, or macOS version), best match first, for agents choosing base images or debugging 'building from source' installs. Applies PEP 425/600/656 tag ordering, abi3, legacy manylinux aliases, Requires-Python and yanked files. CPython only (no PyPy); does not install anything, check dependencies' wheels or inspect wheel contents.","roi":"Saves a failed 20-minute docker build when the architecture has no wheel.","audience":"developer","package":"code-preflight-kit","channels":["x402","mcp"],"endpoint":{"method":"POST","url":"https://agents.writerslogic.com/api/v1/wheel-availability","path":"/api/v1/wheel-availability","contentType":"application/json"},"price":{"amount":"0.005","currency":"USDC","network":"base","perCall":true,"failedCallsCharged":false},"inputSchema":{"type":"object","additionalProperties":false,"required":["package","python","platform"],"properties":{"package":{"type":"string","maxLength":100,"description":"PyPI project name."},"version":{"type":"string","maxLength":64,"description":"Release; default latest."},"python":{"type":"string","maxLength":8,"description":"CPython major.minor, e.g. 3.12.","pattern":"^3\\.[0-9]{1,2}$"},"freeThreaded":{"type":"boolean","description":"Free-threaded build (cp313t): abi3 wheels do not apply."},"platform":{"type":"object","additionalProperties":false,"required":["os","arch"],"properties":{"os":{"type":"string","enum":["linux","macos","windows"]},"arch":{"type":"string","enum":["x86_64","aarch64","i686","armv7l","ppc64le","s390x","arm64","amd64","x86"],"description":"linux: x86_64 aarch64 i686 armv7l ppc64le s390x; macos: x86_64 arm64; windows: amd64 x86 arm64."},"libc":{"type":"string","enum":["glibc","musl"],"description":"linux only; default glibc."},"libcVersion":{"type":"string","maxLength":8,"description":"linux: glibc '2.28' or musl '1.2'. Without it only the linux_<arch> tag matches.","pattern":"^[0-9]{1,3}\\.[0-9]{1,3}$"},"macosVersion":{"type":"string","maxLength":8,"description":"macOS '14.0' or '10.15'.","pattern":"^[0-9]{1,3}\\.[0-9]{1,3}$"}}}}},"resultSchema":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"package":{"type":"string"},"release":{"type":"string"},"wheelCount":{"type":"integer"},"sdistAvailable":{"type":"boolean"},"compatible":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer","description":"0 = most preferred tag."}}}},"best":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer"}}},"skipped":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"reason":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"outputSchema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"package":{"type":"string"},"release":{"type":"string"},"wheelCount":{"type":"integer"},"sdistAvailable":{"type":"boolean"},"compatible":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer","description":"0 = most preferred tag."}}}},"best":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer"}}},"skipped":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"reason":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]},"example":{"package":"markupsafe","python":"3.12","platform":{"os":"linux","arch":"x86_64","libc":"glibc","libcVersion":"2.28"}},"openapiOperation":{"operationId":"wheel_availability","summary":"Is there a compatible PyPI wheel for this Python and platform","description":"Lists the wheels PyPI offers for a package release and picks those compatible with a given CPython version, OS, CPU architecture and libc (glibc or musl version, or macOS version), best match first, for agents choosing base images or debugging 'building from source' installs. Applies PEP 425/600/656 tag ordering, abi3, legacy manylinux aliases, Requires-Python and yanked files. CPython only (no PyPy); does not install anything, check dependencies' wheels or inspect wheel contents.\n\nPrice: 0.005 USDC on Base (x402).","x-x402-price-usdc":"0.005","x-x402-amount":"5000","x-payment-info":{"protocols":["x402"],"price":{"mode":"fixed","currency":"USD","amount":"0.005"}},"x-audience":"developer","x-sample-url":"https://agents.writerslogic.com/api/v1/samples/wheel-availability","security":[{"x402":[]},{"apiKey":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":false,"required":["package","python","platform"],"properties":{"package":{"type":"string","maxLength":100,"description":"PyPI project name."},"version":{"type":"string","maxLength":64,"description":"Release; default latest."},"python":{"type":"string","maxLength":8,"description":"CPython major.minor, e.g. 3.12.","pattern":"^3\\.[0-9]{1,2}$"},"freeThreaded":{"type":"boolean","description":"Free-threaded build (cp313t): abi3 wheels do not apply."},"platform":{"type":"object","additionalProperties":false,"required":["os","arch"],"properties":{"os":{"type":"string","enum":["linux","macos","windows"]},"arch":{"type":"string","enum":["x86_64","aarch64","i686","armv7l","ppc64le","s390x","arm64","amd64","x86"],"description":"linux: x86_64 aarch64 i686 armv7l ppc64le s390x; macos: x86_64 arm64; windows: amd64 x86 arm64."},"libc":{"type":"string","enum":["glibc","musl"],"description":"linux only; default glibc."},"libcVersion":{"type":"string","maxLength":8,"description":"linux: glibc '2.28' or musl '1.2'. Without it only the linux_<arch> tag matches.","pattern":"^[0-9]{1,3}\\.[0-9]{1,3}$"},"macosVersion":{"type":"string","maxLength":8,"description":"macOS '14.0' or '10.15'.","pattern":"^[0-9]{1,3}\\.[0-9]{1,3}$"}}}}},"example":{"package":"markupsafe","python":"3.12","platform":{"os":"linux","arch":"x86_64","libc":"glibc","libcVersion":"2.28"}}}}},"responses":{"200":{"description":"Paid result with provenance","content":{"application/json":{"schema":{"type":"object","properties":{"data":{"type":"object","properties":{"status":{"type":"string","enum":["pass","fail","unknown","unsupported"],"description":"pass: every rule held. fail: a rule was violated (see witnesses). unknown: the input lacks the evidence to decide. unsupported: outside what this engine covers. Missing evidence is never a pass."},"package":{"type":"string"},"release":{"type":"string"},"wheelCount":{"type":"integer"},"sdistAvailable":{"type":"boolean"},"compatible":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer","description":"0 = most preferred tag."}}}},"best":{"type":"object","properties":{"filename":{"type":"string"},"tag":{"type":"string"},"rank":{"type":"integer"}}},"skipped":{"type":"array","items":{"type":"object","properties":{"filename":{"type":"string"},"reason":{"type":"string"}}}},"witnesses":{"type":"array","items":{"type":"object","properties":{"ruleId":{"type":"string"},"detail":{"type":"string"},"path":{"type":"string","description":"JSON pointer or dotted path into the input."},"offset":{"type":"integer"},"index":{"type":"integer"},"expected":{"description":"What the rule required."},"actual":{"description":"What the input had."}}}},"versions":{"type":"object","description":"Every semantic dependency of this answer (engine, tables and their as-of dates, tokenizer, calendar, rounding profile)."},"limits":{"type":"array","items":{"type":"string"}},"deterministic":{"type":"boolean","description":"Always true: pure code, no model."}}},"_provenance":{"type":"object","description":"C2PA-aligned manifest and W3C VC 2.0 (eddsa-jcs-2022) issued by the hub DID; verify at POST /api/v1/verify-provenance"}},"required":["data","_provenance"]}}}},"400":{"description":"Invalid request (no payment consumed)","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"401":{"description":"Invalid X-API-KEY","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}},"402":{"description":"Payment required or invalid","content":{"application/json":{"schema":{"type":"object","description":"x402 v2 PaymentRequired (also base64 in the PAYMENT-REQUIRED header)","properties":{"x402Version":{"type":"integer"},"error":{"type":"string"},"code":{"type":"string"},"resource":{"type":"object"},"accepts":{"type":"array","items":{"type":"object"}},"extensions":{"type":"object"}}}}}},"502":{"description":"Upstream failure; the payment is released or not settled","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"string"},"code":{"type":"string"}}}}}}}},"links":{"docs":"https://agents.writerslogic.com/docs/wheel-availability/","docsJson":"https://agents.writerslogic.com/docs/wheel-availability.json","sample":"https://agents.writerslogic.com/api/v1/samples/wheel-availability","openapi":"https://agents.writerslogic.com/openapi.json","catalog":"https://agents.writerslogic.com/api/v1/catalog","verifyProvenance":"https://agents.writerslogic.com/api/v1/verify-provenance","index":"https://agents.writerslogic.com/docs/index.json"}}