Skip to main content

cellgraph

The cell graph of a notebook or script. A cell is source with a leading # @key value block (-- @key value in a language whose comment marker is --); the set of annotations is the host's, composed from the ten effects the package implements (binds, defines, reads, keeps, after, seeds, member, fan-out, input, no-cache). analyze reads every cell's names and annotations, applies their effects, wires the DAG, says which cells can be planned and why the others cannot, and keys each cell: a definition key from its normalized source and the annotations that change what it computes, and an execution key from the outputs and external inputs the host looks up. The package has no dependencies and runs nothing; the host executes, stores and resolves. It was factored out of Strata's notebook, its first host.

pip install cellgraph

See the API.

import cellgraph as cg

vocab = cg.Vocabulary.core() | cg.Vocabulary(
    [
        cg.Annotation("gpu", parse=cg.scalar(str), in_key=False),
    ]
)
analysis = cg.analyze(
    [cg.Cell("a", "x = 1\n"), cg.Cell("b", "# @gpu A100\ny = x + 1\n")],
    vocab,
)
analysis.cells["b"].annotations["gpu"]  # 'A100'
analysis.dag.topological_order  # ['a', 'b']

Verifying a release

Each release is on PyPI with PEP 740 attestations. From 0.4.0, each is also on GitHub Releases with the same wheel and sdist and a build provenance attestation for each:

gh release download v0.4.0 -R bearing-research/cellgraph
gh attestation verify cellgraph-0.4.0-py3-none-any.whl -R bearing-research/cellgraph

Development

uv sync
uv run pytest
uv run pre-commit run --all-files

Metadata

Release files for cellgraph 0.4.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 cellgraph 0.4.0
File Size Uploaded Provenance Actions
cellgraph-0.4.0.tar.gz 46.6 kB With provenance Details for cellgraph-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 97.5 kB

Release files / cellgraph-0.4.0.tar.gz

Download URL cellgraph-0.4.0.tar.gz
Size 46.6 kB
Tags Source
SHA-256 checksum
How to use checksums
7fa97fcace52822efe8a328f49555f2706a1bc0b381485e885c95c261e2c12ba
BLAKE2b-256 checksum
How to use checksums
fa9e0dd4468825587a4bf0ac906bf2350ff703e68fd6e84d6daa560cf906279a
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 Nov 7, 2026.

Transparency log

Release files / cellgraph-0.4.0-py3-none-any.whl

Download URL cellgraph-0.4.0-py3-none-any.whl
Size 50.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70e813984b071a10e5a9e7997b02e0e41129af58729021f8bbe923bf55a4a905
BLAKE2b-256 checksum
How to use checksums
5214b3cd145b60153591eb8a00efc2588494c380e9ecd95be98e84ac86efa440
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 Nov 7, 2026.

Transparency log

Security for cellgraph 0.4.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

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

Select from 2 files

Attestation for cellgraph-0.4.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 Nov 7, 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