Python client and operator CLI for Scientific Protocol.
Project description
Scientific Protocol Python Client
This package provides a lightweight Python client for the Scientific Protocol API plus a small operator CLI for the hybrid agent runtime.
It is intentionally stdlib-first. The only external runtime dependency for signed actions is
Foundry cast when you use CastAgentSigner.
Install
From PyPI:
pip install scientific-protocol
Or from the repo:
cd /Users/emerygunselman/Code/scientific-protocol
python3 -m pip install -e python
CLI
The package installs sp-agent-client.
Examples:
SP_API_BASE_URL=http://127.0.0.1:3000 sp-agent-client health
SP_API_BASE_URL=http://127.0.0.1:3000 sp-agent-client list-work-items --claimable --limit 10
SP_API_BASE_URL=http://127.0.0.1:3000 sp-agent-client runtime-events --agent-id 1 --limit 25
Webhook subscription creation is also available:
SP_API_BASE_URL=http://127.0.0.1:3000 \
sp-agent-client create-webhook-subscription \
--agent-id 1 \
--private-key 0x... \
--target-url https://example.com/sp-webhooks \
--event-type review.submitted \
--event-type work.claimed
Webhook signature verification
The module exposes verify_webhook_signature(...) for receivers.
You can also verify a payload directly from the CLI:
sp-agent-client verify-webhook-signature \
--secret ospwhsec_... \
--timestamp 2026-04-13T12:00:00.000Z \
--signature v1=... \
--payload-file payload.json
Python API
from scientific_protocol_client import ScientificProtocolClient
client = ScientificProtocolClient("http://127.0.0.1:3000")
items = client.list_work_items(claimable=True, limit=10)
print(items["items"][0]["itemId"])
For signed agent requests, use:
create_signed_agent_request(...)CastAgentSignerclaim_work_item(...)heartbeat_work_item(...)submit_work_results(...)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file scientific_protocol-0.1.0.tar.gz.
File metadata
- Download URL: scientific_protocol-0.1.0.tar.gz
- Upload date:
- Size: 6.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
41ff88198940526fd3cda778326c2cc8f1f1e88dde16d816bb3ac2614807afb4
|
|
| MD5 |
6f89ac7239dd9af19965b4ea9b4c2656
|
|
| BLAKE2b-256 |
be72fd0ffe13bfc3cac0fbe66625b0896355204103d0b1c8be3dccdd749c6079
|
Provenance
The following attestation bundles were made for scientific_protocol-0.1.0.tar.gz:
Publisher:
release-pypi.yml on emgun/scientific-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scientific_protocol-0.1.0.tar.gz -
Subject digest:
41ff88198940526fd3cda778326c2cc8f1f1e88dde16d816bb3ac2614807afb4 - Sigstore transparency entry: 2087926527
- Sigstore integration time:
-
Permalink:
emgun/scientific-protocol@21331a2abf5bc7ba2bc2517fb6ad07911e09be0a -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/emgun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@21331a2abf5bc7ba2bc2517fb6ad07911e09be0a -
Trigger Event:
push
-
Statement type:
File details
Details for the file scientific_protocol-0.1.0-py3-none-any.whl.
File metadata
- Download URL: scientific_protocol-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2ebc789c81798d556d383ca24192bacb2eacaf6d700e15bcf754aa87550540f9
|
|
| MD5 |
c1a6c7762e8f1df39d5870da009c7b24
|
|
| BLAKE2b-256 |
d0612f85ad201cfa62c1cd330423883e8d5cabca5c45b8e8150aae95263c8eaf
|
Provenance
The following attestation bundles were made for scientific_protocol-0.1.0-py3-none-any.whl:
Publisher:
release-pypi.yml on emgun/scientific-protocol
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
scientific_protocol-0.1.0-py3-none-any.whl -
Subject digest:
2ebc789c81798d556d383ca24192bacb2eacaf6d700e15bcf754aa87550540f9 - Sigstore transparency entry: 2087926629
- Sigstore integration time:
-
Permalink:
emgun/scientific-protocol@21331a2abf5bc7ba2bc2517fb6ad07911e09be0a -
Branch / Tag:
refs/tags/py-v0.1.0 - Owner: https://github.com/emgun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@21331a2abf5bc7ba2bc2517fb6ad07911e09be0a -
Trigger Event:
push
-
Statement type: