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 1.0.0rc1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| research_commons-1.0.0rc1-py3-none-manylinux_2_17_x86_64.whl | Python 3 | none | Linux glibc 2.17+ x86-64 | Details for research_commons-1.0.0rc1-py3-none-manylinux_2_17_x86_64.whl |
| research_commons-1.0.0rc1-py3-none-manylinux_2_17_aarch64.whl | Python 3 | none | Linux glibc 2.17+ ARM64 | Details for research_commons-1.0.0rc1-py3-none-manylinux_2_17_aarch64.whl |
| research_commons-1.0.0rc1-py3-none-macosx_13_0_x86_64.whl | Python 3 | none | macOS 13.0+ x86-64 | Details for research_commons-1.0.0rc1-py3-none-macosx_13_0_x86_64.whl |
| research_commons-1.0.0rc1-py3-none-macosx_13_0_arm64.whl | Python 3 | none | macOS 13.0+ ARM64 | Details for research_commons-1.0.0rc1-py3-none-macosx_13_0_arm64.whl |
Total release size: 20.3 MB
Release files / research_commons-1.0.0rc1-py3-none-manylinux_2_17_x86_64.whl
| Download URL | research_commons-1.0.0rc1-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 |
eee083840b32e1d008b974628d585bab60e07714a76c678a4ccbf8e30a8b5ecf
|
|
BLAKE2b-256 checksum How to use checksums |
a183e915416ae513e0c5bc049f2fc4a9ed1fff1b75a25ad68eceef1d69f2b1b7
|
| 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 logRelease files / research_commons-1.0.0rc1-py3-none-manylinux_2_17_aarch64.whl
| Download URL | research_commons-1.0.0rc1-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 |
be3eb6489fd0cbcea733023c819344d12b770926e1562ba6b25394a95973cdb4
|
|
BLAKE2b-256 checksum How to use checksums |
ac900887b43225c46494cbc55168b75fcc45f7fafa48d6b6a2a3a35828221dfe
|
| 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 logRelease files / research_commons-1.0.0rc1-py3-none-macosx_13_0_x86_64.whl
| Download URL | research_commons-1.0.0rc1-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 |
66b3c76b79a2251fa60b529bb4e084cc891ab43d1572968dfbe2a9c3256e259a
|
|
BLAKE2b-256 checksum How to use checksums |
43c5a0186618479f066b9af68efbc9d111c346ad767c6a17b0975e638fc03a60
|
| 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 logRelease files / research_commons-1.0.0rc1-py3-none-macosx_13_0_arm64.whl
| Download URL | research_commons-1.0.0rc1-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 |
dd17da2e921fdce96d997f40e64265467d17fe08b42d83a9a8999165a72bff1f
|
|
BLAKE2b-256 checksum How to use checksums |
5e1a432630b75558aa1316015ccf5110b5cac166d87e709ca26d9aa51282953c
|
| 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 logSecurity for research-commons 1.0.0rc1
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.
Attestation for research_commons-1.0.0rc1-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 logA 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.