Skip to main content

gocam

gocam is a Python data model and command-line interface for working with Gene Ontology Causal Activity Models (GO-CAMs). It provides Pydantic models for validated GO-CAM data, tools for fetching published models, and optional translations to formats such as CX2 and gene-centered networks.

Learn more about GO-CAMs or explore published models in the GO-CAM browser.

Installation

Install gocam from PyPI:

pip install gocam

This installs both the Python package and the gocam command.

Quick start

Fetch a published model as YAML from the command line:

gocam fetch 5b91dbd100002057 > model.yaml

Fetch and translate a published model from Python:

from gocam.translation import MinervaWrapper

model = MinervaWrapper().fetch_model("5b91dbd100002057")
print(model.title)

Load and validate a local JSON model:

from pathlib import Path

from gocam.datamodel import Model

model = Model.model_validate_json(Path("model.json").read_text())
print(model.id)

See the getting-started guide for JSON output, local YAML loading, serialization, and more complete examples.

Documentation

Development

The source schema is src/gocam/schema/gocam.yaml. This repository also contains reusable Python code and internal scripts used by the GO Release pipeline. One-off and exploratory analyses belong in the gocam-analysis repository.

Install uv, clone the repository, and create the complete development environment:

git clone https://github.com/geneontology/gocam-py.git
cd gocam-py
uv sync --all-extras

CX2-related development requires Graphviz to be installed on the system before syncing the optional dependencies.

Run the standard project checks:

make test
make lint-python
make type-check

Regenerate schema-derived outputs when intentionally changing the schema:

make src/gocam/datamodel/gocam.py
make gen-project
make gendoc

The generated project/ directory is disposable local output. Versioned generated schema artifacts are distributed through GitHub Releases.

Metadata

Release files for gocam 0.14.1

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

Source distribution (sdist)

Source distribution for gocam 0.14.1
File Size Uploaded Provenance Actions
gocam-0.14.1.tar.gz 384.1 kB With provenance Details for gocam-0.14.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for gocam 0.14.1
File Interpreter ABI Platform Actions
gocam-0.14.1-py3-none-any.whl Python 3 none any Details for gocam-0.14.1-py3-none-any.whl

Total release size: 450.5 kB

Release files / gocam-0.14.1.tar.gz

Download URL gocam-0.14.1.tar.gz
Size 384.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3fdcdd12dc73e12cb1c807ef01ec7901360fd467bdd58248c7fce0a280707b91
BLAKE2b-256 checksum
How to use checksums
3d60c6c6a9ffac8c2aafc65b3de609e09076c87e684af32e9884e66a55401cfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 21, 2026.

Transparency log

Release files / gocam-0.14.1-py3-none-any.whl

Download URL gocam-0.14.1-py3-none-any.whl
Size 66.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
233d8ae8fc1aece45fefbf41884e8e3971102edbf17e08bf0c5367ac03fe20f4
BLAKE2b-256 checksum
How to use checksums
cb39c2fe8523f01eb1fe2425a3d6f9bf1142b50c9cc07cd0debf75a98b8c56aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 21, 2026.

Transparency log

Security for gocam 0.14.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gocam-0.14.1.tar.gz

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 Oct 21, 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