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 scientific-protocol. The older sp-agent-client command remains available.
Examples:
SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol health
SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol list-work-items --claimable --limit 10
SP_API_BASE_URL=http://127.0.0.1:3000 scientific-protocol runtime-events --agent-id 1 --limit 25
Webhook subscription creation is also available:
SP_API_BASE_URL=http://127.0.0.1:3000 \
scientific-protocol 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:
scientific-protocol verify-webhook-signature \
--secret ospwhsec_... \
--timestamp 2026-04-13T12:00:00.000Z \
--signature v1=... \
--payload-file payload.json
Python API
from scientific_protocol 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.1.tar.gz.
File metadata
- Download URL: scientific_protocol-0.1.1.tar.gz
- Upload date:
- Size: 6.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6591a548b20b6553092ec977f08db847ea38a21570a34f3d2f3c2867d08e6d98
|
|
| MD5 |
6075ef5b3902f4ee3639ee4f3f9e5f84
|
|
| BLAKE2b-256 |
84ac51dd16b7a685b04d722ca302a98b3e8247c125da5ba31e1ce3c2e8528688
|
Provenance
The following attestation bundles were made for scientific_protocol-0.1.1.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.1.tar.gz -
Subject digest:
6591a548b20b6553092ec977f08db847ea38a21570a34f3d2f3c2867d08e6d98 - Sigstore transparency entry: 2088111306
- Sigstore integration time:
-
Permalink:
emgun/scientific-protocol@42487c2d099fe064085b810c5ebdc799736d9906 -
Branch / Tag:
refs/tags/py-v0.1.1 - Owner: https://github.com/emgun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@42487c2d099fe064085b810c5ebdc799736d9906 -
Trigger Event:
push
-
Statement type:
File details
Details for the file scientific_protocol-0.1.1-py3-none-any.whl.
File metadata
- Download URL: scientific_protocol-0.1.1-py3-none-any.whl
- Upload date:
- Size: 7.1 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 |
9e8e7170ad75577ee8b6ce5f984349c56db6890ec027391cb130b4c31ab5e186
|
|
| MD5 |
f21cd4f04eb873824d76a7fe69fea412
|
|
| BLAKE2b-256 |
4622e62476b14bf0ff3d758355342728e3bd3379f80ba949f33f8d59c932866f
|
Provenance
The following attestation bundles were made for scientific_protocol-0.1.1-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.1-py3-none-any.whl -
Subject digest:
9e8e7170ad75577ee8b6ce5f984349c56db6890ec027391cb130b4c31ab5e186 - Sigstore transparency entry: 2088111476
- Sigstore integration time:
-
Permalink:
emgun/scientific-protocol@42487c2d099fe064085b810c5ebdc799736d9906 -
Branch / Tag:
refs/tags/py-v0.1.1 - Owner: https://github.com/emgun
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@42487c2d099fe064085b810c5ebdc799736d9906 -
Trigger Event:
push
-
Statement type: