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

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.0
File Size Uploaded Provenance
gocam-0.14.0.tar.gz 383.8 kB With provenance Details

Built distribution (wheel)

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

Total release size: 450.1 kB

Release files / gocam-0.14.0.tar.gz

Download URL gocam-0.14.0.tar.gz
Size 383.8 kB
Tags Source
SHA-256 checksum
How to use checksums
f927c3e7638a1134d7b037243d2222b2d4128a8aa837776453ad8d86fa92885c
BLAKE2b-256 checksum
How to use checksums
8d6e087c3c33bace5c2d68cd9767808ef598381f7a906ff8c3311f423007f7bf
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 19, 2026.

Transparency log

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

Download URL gocam-0.14.0-py3-none-any.whl
Size 66.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
1add7ac09601b2dea0855c11bc7b430bf0635fceb2b8e269ac3c27e188e6b25b
BLAKE2b-256 checksum
How to use checksums
c591de629f90e6742bbad38f9d52b894b67de2cac3efa921a890cfe68cb140a2
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 19, 2026.

Transparency log

Security for gocam 0.14.0

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 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for gocam-0.14.0.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 19, 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.

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