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

The development environment includes all optional dependencies. CX2-related development requires Graphviz to be installed on the system before syncing. To sync the development tools without the optional dependencies, use uv sync --no-group all-extras.

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

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.2
File Size Uploaded Provenance Actions
gocam-0.14.2.tar.gz 433.6 kB With provenance Details for gocam-0.14.2.tar.gz

Built distribution (wheel)

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

Total release size: 501.0 kB

Release files / gocam-0.14.2.tar.gz

Download URL gocam-0.14.2.tar.gz
Size 433.6 kB
Tags Source
SHA-256 checksum
How to use checksums
66a6bde2813d4ed1334b5bf514e9441075a1c8f381ac2f65b4c34e7a0099e92d
BLAKE2b-256 checksum
How to use checksums
230ad218cd81833f1d4201830f8d3abf07558be07e618eb702de47a264f18233
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 25, 2026.

Transparency log

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

Download URL gocam-0.14.2-py3-none-any.whl
Size 67.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7e6751c71e1a40a8d3b152837d168aaf462f9587f7e6fcfd11ca75bceaadac9d
BLAKE2b-256 checksum
How to use checksums
37644764fc87222dcd581901a6b27860d5ebcb0d8f9275b477746d9177b47902
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 25, 2026.

Transparency log

Security for gocam 0.14.2

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.2.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 Nov 25, 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