Skip to main content

cellgraph

The cell graph of a notebook or script. A cell is source with a leading # @key value block; 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, whose formats it reproduces exactly under legacy-1.

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']

Development

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

Metadata

Release files for cellgraph 0.3.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.3.0
File Size Uploaded Provenance Actions
cellgraph-0.3.0.tar.gz 38.0 kB With provenance Details for cellgraph-0.3.0.tar.gz

Built distribution (wheel)

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

Total release size: 80.2 kB

Release files / cellgraph-0.3.0.tar.gz

Download URL cellgraph-0.3.0.tar.gz
Size 38.0 kB
Tags Source
SHA-256 checksum
How to use checksums
26641f7f74eae57882c889b3ddee6e84b30346f3d01ec1ce5c97205fba079230
BLAKE2b-256 checksum
How to use checksums
0c02e2236afc72bb780a44647962345e2577eecbb16537722c6a9ac34fa43768
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 3, 2026.

Transparency log

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

Download URL cellgraph-0.3.0-py3-none-any.whl
Size 42.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
7bb523fee9f0948bc36d9a7d59cf3c2fa97777191e8a4af6a2dd8e956b4ca17e
BLAKE2b-256 checksum
How to use checksums
3db46e381c3c0232e97644631b6a656612247a01c710e030a12c6d6422558f85
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 3, 2026.

Transparency log

Security for cellgraph 0.3.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.3.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 3, 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