Typed async Python SDK for onejudge
Project description
onejudge
Typed async Python access to the onejudge CLI. The distribution is
onejudge, the import is onejudge_sdk, and each release depends on the
exact same onejudge-cli version.
pip install onejudge
import asyncio
from onejudge_sdk import OneJudge
async def main() -> None:
result = await OneJudge().run(
{"provider": {"kind": "oneharness"}},
"Review this repository",
cwd="/path/to/repository",
timeout=3600,
)
print(result.completed, result.assistant_turns, result.verdicts)
asyncio.run(main())
run validates the config before starting the CLI, writes a temporary effective
JSON config (JSON is valid YAML), and always sends the task over stdin with
--task -. It accepts a provider override, subprocess cwd, additional env
(including ONEHARNESS_HISTORY_LABELS and ONEHARNESS_TIMEOUT), and a timeout.
Executable resolution is the constructor's executable, then ONEJUDGE_BIN,
then onejudge on PATH.
Exit 0 and 1 return RunResult: exit_code and stderr remain available, and
raw, completed, verdicts, usage, assistant_turns, and agent_turns
cover ai-orchestrator's dispatch needs. Exit 2 (bad config or provider/runtime
failure) and unexpected nonzero exits raise OneJudgeProcessError without
discarding the exit code or stderr. A caller timeout raises
OneJudgeTimeoutError.
There is no run_stream method. onejudge run currently emits one final JSON
report; the JSONL interface in docs/protocol.md is the internal provider
protocol, not a CLI result stream.
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 onejudge-0.3.2.tar.gz.
File metadata
- Download URL: onejudge-0.3.2.tar.gz
- Upload date:
- Size: 10.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 |
d6a6bbf89e9c4f78aeee805d29d92206754f1fd4babe6a7ce0ca7771d0099f5a
|
|
| MD5 |
9f1bef7304da1896ed3dff346c146541
|
|
| BLAKE2b-256 |
83437a4bdae9f5537e25e3db850086f50b5a1b2fd869f935c775e1a48c8f3a8d
|
Provenance
The following attestation bundles were made for onejudge-0.3.2.tar.gz:
Publisher:
release-pypi.yml on nickderobertis/onejudge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onejudge-0.3.2.tar.gz -
Subject digest:
d6a6bbf89e9c4f78aeee805d29d92206754f1fd4babe6a7ce0ca7771d0099f5a - Sigstore transparency entry: 2195109091
- Sigstore integration time:
-
Permalink:
nickderobertis/onejudge@a28e0138f5d662f3ad9c8b859285be77eab17d8f -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/nickderobertis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@a28e0138f5d662f3ad9c8b859285be77eab17d8f -
Trigger Event:
release
-
Statement type:
File details
Details for the file onejudge-0.3.2-py3-none-any.whl.
File metadata
- Download URL: onejudge-0.3.2-py3-none-any.whl
- Upload date:
- Size: 13.3 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 |
67955b0e4288100c2cd5768fc39686a45a151017e902408ca1b00de3d4c3eba5
|
|
| MD5 |
718ced7da44bac4fac493a5bfac3704c
|
|
| BLAKE2b-256 |
4a0a3948ad31c194dfe171fee3d5b824938708d467ec03671230795711c5452f
|
Provenance
The following attestation bundles were made for onejudge-0.3.2-py3-none-any.whl:
Publisher:
release-pypi.yml on nickderobertis/onejudge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
onejudge-0.3.2-py3-none-any.whl -
Subject digest:
67955b0e4288100c2cd5768fc39686a45a151017e902408ca1b00de3d4c3eba5 - Sigstore transparency entry: 2195109109
- Sigstore integration time:
-
Permalink:
nickderobertis/onejudge@a28e0138f5d662f3ad9c8b859285be77eab17d8f -
Branch / Tag:
refs/tags/v0.3.2 - Owner: https://github.com/nickderobertis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release-pypi.yml@a28e0138f5d662f3ad9c8b859285be77eab17d8f -
Trigger Event:
release
-
Statement type: