Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

research-commons (Python)

A thin Python wrapper around the Research Commons command-line tool, commons. It runs the binary with --json and returns what it printed. It never reimplements any logic of the tool: every answer, token and exit code is the binary's own.

Alpha: the tool's --json output may change between alpha releases, and so may this package's surface. Python 3.9 or newer, standard library only. Linux and macOS (the tool does not build for Windows).

Install

pip install research-commons
commons --version

A platform wheel (Linux x86-64 and arm64, macOS x86-64 and arm64) carries the commons binary and installs a commons command that runs it. Without a wheel for your platform, the package still imports; it finds the binary in this order: the one bundled in the wheel, $COMMONS_BIN, then PATH. A $COMMONS_BIN that is set but is not an executable file is an error (it never falls through to PATH).

Use

import research_commons as rc

r = rc.run("list", "--store", "/path/to/store")   # Result(exit, json, stdout, stderr)
r.json["count"]

rc.show(digest, store=...)                        # thin conveniences: show, verify, list_, status, version
r = rc.verify(digest, store=..., check=False)     # exit 0, 1 and 3 are verdicts, not exceptions
r.exit, r.json["grade"]

run(*args, input=None, check=True, cwd=None, env=None, timeout=None) adds --json unless you gave it.

Errors

With check=True (the default) a non-zero exit raises a CommonsError subclass chosen by the exit code alone (commons help exits):

exit exception
1 CheckedAndWrong
2 DidNotStart
3 CouldNotCheck
4 NothingToRerun
5 EnvironmentMismatch

When the binary printed an RFC 9457 problem object, it is on the exception: e.problem (the whole object), e.slug, e.type, e.title, e.detail, e.problem_class, e.scope, e.committed, e.next, e.peer_text. The message holds only the tool's own words; text that came from a peer or from your arguments is in peer_text and is untrusted. A verdict (verify exiting 1 or 3 prints a result, not a problem) has no problem: read e.result.json, or call with check=False.

BinaryNotFound means there is no binary to run; UnparseableOutput means exit 0 with non-JSON stdout.

Develop

cd python
python3 -m unittest -v        # builds ./cmd/commons for the real-binary tests when Go is installed
python3 scripts/build_wheels.py --help

Metadata

Release files for research-commons 0.5.0a7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distributions (wheels)

Table of built distributions (wheels) for research-commons 0.5.0a7
File Actions
research_commons-0.5.0a7-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for research_commons-0.5.0a7-py3-none-manylinux_2_17_x86_64.whl
research_commons-0.5.0a7-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for research_commons-0.5.0a7-py3-none-manylinux_2_17_aarch64.whl
research_commons-0.5.0a7-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for research_commons-0.5.0a7-py3-none-macosx_13_0_x86_64.whl
research_commons-0.5.0a7-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for research_commons-0.5.0a7-py3-none-macosx_13_0_arm64.whl

Total release size: 20.1 MB

Release files / research_commons-0.5.0a7-py3-none-manylinux_2_17_x86_64.whl

Download URL research_commons-0.5.0a7-py3-none-manylinux_2_17_x86_64.whl
Size 5.2 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
b78cf594b1c9f50358fba3a2f481977b7b6d7fc6e6cc6071f6ac3b4715e944f1
BLAKE2b-256 checksum
How to use checksums
df8f637378a3991c32ed00bb8d23e9505d7ff217bcac529f9ee337e2eff5b528
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / research_commons-0.5.0a7-py3-none-manylinux_2_17_aarch64.whl

Download URL research_commons-0.5.0a7-py3-none-manylinux_2_17_aarch64.whl
Size 4.7 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
f9dbc86df4e57c8cb812b9aa8f8f20cafa9797f06540519be02813951d615c72
BLAKE2b-256 checksum
How to use checksums
19939ccb5005fe2b4d0142290559979ac0eaea81610c383d6a330875a421a097
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / research_commons-0.5.0a7-py3-none-macosx_13_0_x86_64.whl

Download URL research_commons-0.5.0a7-py3-none-macosx_13_0_x86_64.whl
Size 5.3 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
cc9d697e5d4319ede84e8363d350f58bbd56adecca4d8b3a233e02daf4ca0e42
BLAKE2b-256 checksum
How to use checksums
0e026f17dee10df989e3ecfd2720186432050c2af1dad6909b30e0b9b75abc83
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Release files / research_commons-0.5.0a7-py3-none-macosx_13_0_arm64.whl

Download URL research_commons-0.5.0a7-py3-none-macosx_13_0_arm64.whl
Size 4.9 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
217f50bf2879f08807b988af5f02913766e0f1efa9677f3b65450a5925175b22
BLAKE2b-256 checksum
How to use checksums
3dc8d9fc58afd1d6c8b91e5c4515d0a02f362f028948439cc8f8cec2ec4eccc8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

Security for research-commons 0.5.0a7

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.

Full provenance

All 4 files in this release have been uploaded with provenance metadata.

Select from 4 files

Attestation for research_commons-0.5.0a7-py3-none-manylinux_2_17_x86_64.whl

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 17, 2026.

Transparency log

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page