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.0a8

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.0a8
File Actions
research_commons-0.5.0a8-py3-none-manylinux_2_17_x86_64.whl Python 3 none Linux glibc 2.17+ x86-64 Details for research_commons-0.5.0a8-py3-none-manylinux_2_17_x86_64.whl
research_commons-0.5.0a8-py3-none-manylinux_2_17_aarch64.whl Python 3 none Linux glibc 2.17+ ARM64 Details for research_commons-0.5.0a8-py3-none-manylinux_2_17_aarch64.whl
research_commons-0.5.0a8-py3-none-macosx_13_0_x86_64.whl Python 3 none macOS 13.0+ x86-64 Details for research_commons-0.5.0a8-py3-none-macosx_13_0_x86_64.whl
research_commons-0.5.0a8-py3-none-macosx_13_0_arm64.whl Python 3 none macOS 13.0+ ARM64 Details for research_commons-0.5.0a8-py3-none-macosx_13_0_arm64.whl

Total release size: 20.2 MB

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

Download URL research_commons-0.5.0a8-py3-none-manylinux_2_17_x86_64.whl
Size 5.3 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
59e3f40f38023b312f9066410c93407177be8c22f2bd1e4617deaf176753d9b9
BLAKE2b-256 checksum
How to use checksums
61fa78539f23a02feef04583bff7ca121b0af38a0bf4bb4baa605b060c10b627
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.0a8-py3-none-manylinux_2_17_aarch64.whl

Download URL research_commons-0.5.0a8-py3-none-manylinux_2_17_aarch64.whl
Size 4.8 MB
Tags Linux glibc 2.17+ ARM64 Python 3
SHA-256 checksum
How to use checksums
bd210fe685def1a9831604ae8fa3e21d5aa9cb36883eec34b967f59d4e3da51c
BLAKE2b-256 checksum
How to use checksums
3e905529369806073704193459bdb9eebf99979f89992d71d86ae24a78f67197
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.0a8-py3-none-macosx_13_0_x86_64.whl

Download URL research_commons-0.5.0a8-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
c268d1bbc4bcbf6250dfd582f2684eedbaa2b60bd0faef64e26815baf6a9ed65
BLAKE2b-256 checksum
How to use checksums
84adba434b092c409d169d7dfb32dbb3c4ad25b7dfce2b86d138067722a0b07d
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.0a8-py3-none-macosx_13_0_arm64.whl

Download URL research_commons-0.5.0a8-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
d685b318d660ed182ca74118bb103df42316009fe75e3d2bf4c6b113f9e69fe9
BLAKE2b-256 checksum
How to use checksums
62b46883ac685c37374603ae31c2f252ea8585ab27778dcd36a4fc48e1b8990c
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.0a8

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.0a8-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