Keble Scraper Contract
keble-scraper-contract is the framework-free request, lifecycle, artifact,
proxy, callback, and operator identity boundary for Keble's asynchronous
scraper. Generic callers can submit only GET/HEAD public-resource requests.
The sole POST exception is the registered, typed Shopify Storefront GraphQL
profile; callers cannot supply GraphQL text, mutations, arbitrary headers, or
credentials.
All values are immutable Pydantic v2 models, reject undeclared fields, serialize with camel-case aliases, and expose bounded enums instead of arbitrary TTLs or transport flags.
ScrapeArtifactPin is the ordered retention-policy command for one stable
artifact/owner identity. Its required positive retention_revision makes
finite archive expiry, indefinite latest retention, replay, and out-of-order
delivery distinguishable. A producer must increment that revision whenever it
changes expires_at; reusing one revision for a different expiry is a contract
conflict.
Version 0.3.0 releases that ordered retention contract together with the
complete typed failure boundary. The new pin field is intentionally mandatory:
an older producer cannot silently recreate indefinite paid-storage retention,
and a delayed delivery cannot reverse a newer finite/indefinite policy. Shopify,
Scraper API, and Data Infra therefore repin in the same release wave.
Version 0.2.0 replaces free-string attempt/job/callback failures with one
discriminated contract:
ScrapeLocalFailureowns caller-auth, request-policy, runtime, capacity, and operator failures through a finite code/origin vocabulary;ScrapeUpstreamFailureowns target-resource, paid-egress, and browser-provider failures with universal kind/disposition/action, exact capacity evidence, bounded native status/request identity, and optional retry time;- supplier payment is valid only for a paid supplier origin with reviewed
documented-code or account-status evidence. A target
402, a rate limit, quarantine, or missing credential never implies payment; - attempts, terminal jobs, signed completion events, and HTTP errors use the same typed failure family. Success forbids failure evidence and every failed terminal state requires it.
The public wire uses ScrapeFailureEnvelope for non-success HTTP responses.
The contract source/version guard compares src/ with the latest
package-scoped annotated tag and rejects source drift under an existing version
or metadata regression.
Side effects if changes:
- scraper API, Shopify polling/callbacks, and frontend mappings must release in the same wave;
- artifact-pin revisions and Shopify pin-outbox payloads must remain one coordinated wire contract;
- Data Infra may adapt upstream failures but must not reinterpret local failures as provider payment.
uv run --package keble-scraper-contract pytest -q keble-scraper-contract/tests
npx --yes pyright .
uv run python keble-scraper-contract/src/keble_scraper_contract/release_guard.py
uv build --package keble-scraper-contract
Metadata
Release files for keble-scraper-contract 0.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| keble_scraper_contract-0.3.0.tar.gz | 21.0 kB | Without provenance | Details for keble_scraper_contract-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| keble_scraper_contract-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for keble_scraper_contract-0.3.0-py3-none-any.whl |
Total release size: 41.5 kB
Release files / keble_scraper_contract-0.3.0.tar.gz
| Download URL | keble_scraper_contract-0.3.0.tar.gz |
|---|---|
| Size | 21.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b2e66e19622e71778c19f40f395df28868cfe5b020910a614ab92943e329c5eb
|
|
BLAKE2b-256 checksum How to use checksums |
5d3de5d71762ad19a60f4500a8ca0aa3f0e3e1189f1e02802af9a209dfffa3d7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Release files / keble_scraper_contract-0.3.0-py3-none-any.whl
| Download URL | keble_scraper_contract-0.3.0-py3-none-any.whl |
|---|---|
| Size | 20.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
112884d8f4c892858ed03c31310c1695cf0af83e142231c5a7a8d992ad53bb41
|
|
BLAKE2b-256 checksum How to use checksums |
6c9aaadae57040560cde9ecca29a26e9f498168bc8ebc482ae583ab419203fb4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.10.9 {"installer":{"name":"uv","version":"0.10.9","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for keble-scraper-contract 0.3.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.