Skip to main content

Folio

folio-kit

Portable, AI-native data sheets. The Python distribution ships three console scripts and a Python SDK for reading and writing typed data sheets that humans and AI agents can both edit.

my-sheet/
├── contract.yaml         # required — ODCS subset
├── records.jsonl         # required — one JSON object per line
├── derivations/          # optional — derivation files (ai / python / sql / cross_sheet / import / http)
├── scripts/              # optional — reusable Python scripts
├── skills/               # optional — packaged operating procedures (markdown + YAML frontmatter)
├── provenance.jsonl      # append-only audit log
└── README.md             # optional, with typed frontmatter

What you get

Surface Command Purpose
CLI folio init, validate, query, list, count, upsert, delete, materialize, status, provenance, serve, script, skill, export
MCP server folio-mcp FastMCP server exposing the SDK over stdio or HTTP — plus one MCP prompt per skill — drop into Claude Desktop / Cursor / any MCP client
Viewer backend folio-viewer Local-only FastAPI server that powers the Folio Viewer desktop app and web UI
Python SDK from folio import open_sheet Programmatic access to the same operations as the CLI

Install

pipx install folio-kit
# or
uv tool install folio-kit

The distribution name is folio-kit; the on-disk command is folio.

Quickstart

folio validate ./my-sheet
folio materialize ./my-sheet --actor agent:demo
folio query ./my-sheet "SELECT id, status FROM records LIMIT 5"

Programmatic:

from folio import open_sheet

sheet = open_sheet("./my-sheet", actor="agent:demo")
sheet.upsert({"id": "cust_001", "company_name": "Acme", "country": "Japan"})
result = sheet.materialize()
print(result)   # {"materialized": 1, "skipped": 0, "failures": [], "total_cost": 0.0}

Derivations

A derivations/<field>.yaml declares how a derived column is filled. Folio ships six kinds:

  • ai — call an LLM (Anthropic by default; injectable AIClient)
  • python — run a reusable script from scripts/
  • sql — DuckDB query against the sheet's records view
  • cross_sheet — pull a value from a sibling Folio sheet (1:1 by PK)
  • import — copy from a CSV / JSON file
  • http — fetch from a URL

Every value comes with a provenance entry (actor, timestamp, input hash, model + cost for ai). Re-runs are content-hashed and cached.

Requirements

  • Python 3.13+
  • Optional: ANTHROPIC_API_KEY in the environment if you use kind: ai derivations against the default adapter. Bring-your-own AIClient for any other provider.

Links

License

MIT.

Metadata

Release files for folio-kit 0.1.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for folio-kit 0.1.8
File Size Uploaded
folio_kit-0.1.8.tar.gz 366.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for folio-kit 0.1.8
File Interpreter ABI Platform
folio_kit-0.1.8-py3-none-any.whl Python 3 none any Details

Total release size: 436.6 kB

Release files / folio_kit-0.1.8.tar.gz

Download URL folio_kit-0.1.8.tar.gz
Size 366.5 kB
Tags Source
SHA-256 checksum
How to use checksums
95dc37c97f7d515b535fbbc0ce77ad055fe7379c384210eaa15ef04a884e9935
BLAKE2b-256 checksum
How to use checksums
7a9685b696c1d99ae8ef0d85e56e6f0c081282cc6b0227bb80fd380b11b31246
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 May 11, 2026.

Transparency log

Release files / folio_kit-0.1.8-py3-none-any.whl

Download URL folio_kit-0.1.8-py3-none-any.whl
Size 70.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9b01ab628a3f00183ad3256c1eb46a2bb32a6a2deb6604ea7123851729433e0d
BLAKE2b-256 checksum
How to use checksums
9e1c605b557bbb90df11ec3412ba71013a6235c1c32874b569c912a160fc7ced
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.13

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 May 11, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.8 This release

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

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