Skip to content

Support catalogs - #176

Merged
joefreeman merged 13 commits into
mainfrom
catalog
Sep 19, 2026
Merged

joefreeman merged 13 commits into
mainfrom
catalog

Conversation

@joefreeman

Copy link
Copy Markdown
Collaborator

This adds initial support for a project catalog. Tasks can publish values to the catalog, read current values, and wait for the next value. Waiting works with suspense, so an execution can go to sleep until an update become available.

A catalog can be defined at the module level, it can be typed, and its path an be parameterised:

models = cf.Catalog("models/{name}")
counts = cf.Catalog[dict[str, int]]("counts/{id}")

Within a task, use .at(...) to resolve the placeholders (if needed), and .publish(...) to write a new value:

counts.at(id="words").publish({"the": 412})

If Pydantic is installed, types are validated at publish and read.

Within a task use .current() to get the latest value (relative to an execution's snapshot) - this will block (or suspend) if no value is available:

churn_rate = models.at(name="churn_rate").current()

Or use .next() to suspend execution, deferring to an execution snapshotted against the next version (when available):

models.at(name="churn_rate").next()

Catalogs are scoped to a workspace using the same inheritance rules as elsewhere.

@joefreeman
joefreeman merged commit 38ad66c into main Sep 19, 2026
10 checks passed
@joefreeman
joefreeman deleted the catalog branch September 19, 2026 06:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant