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

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

Total release size: 19.8 MB

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

Download URL research_commons-0.5.0a6-py3-none-manylinux_2_17_x86_64.whl
Size 5.1 MB
Tags Linux glibc 2.17+ x86-64 Python 3
SHA-256 checksum
How to use checksums
4d0db00ddf6669758e05d568fa7e139408ebfd10face3441872ac4328a7ad2d1
BLAKE2b-256 checksum
How to use checksums
98e05892253e45da178f16c18b1dd0b14851d8183456d33eb912674fdd540e3d
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.0a6-py3-none-manylinux_2_17_aarch64.whl

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

Download URL research_commons-0.5.0a6-py3-none-macosx_13_0_x86_64.whl
Size 5.2 MB
Tags Python 3 macOS 13.0+ x86-64
SHA-256 checksum
How to use checksums
5e689765df51e592755d952bf39cc266fa4f36088954005ac589bc7ceb04f4b0
BLAKE2b-256 checksum
How to use checksums
b44ba0526e6d1fe3cbbdf50ef3bcab1965fd26b8ce57ba1698026d3975eafce7
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.0a6-py3-none-macosx_13_0_arm64.whl

Download URL research_commons-0.5.0a6-py3-none-macosx_13_0_arm64.whl
Size 4.8 MB
Tags Python 3 macOS 13.0+ ARM64
SHA-256 checksum
How to use checksums
7e5bfe140ffd73aaa1e6f5238546d02e02a6087f690cde21c260edb93392f16d
BLAKE2b-256 checksum
How to use checksums
411df08999bf6e2d6b7b378e03c50fdacd329b176b4f71722263a69e397814dc
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.0a6

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