Skip to main content

Portable, AI-native data sheets.

Project description

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
├── provenance.jsonl      # append-only audit log
└── README.md             # optional, with typed frontmatter

What you get

Surface Command Purpose
CLI folio validate, query, list, upsert, delete, materialize, status, provenance, serve, script, export
MCP server folio-mcp FastMCP server exposing the SDK over stdio or HTTP — 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

folio_kit-0.1.6.tar.gz (287.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

folio_kit-0.1.6-py3-none-any.whl (58.4 kB view details)

Uploaded Python 3

File details

Details for the file folio_kit-0.1.6.tar.gz.

File metadata

  • Download URL: folio_kit-0.1.6.tar.gz
  • Upload date:
  • Size: 287.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for folio_kit-0.1.6.tar.gz
Algorithm Hash digest
SHA256 7f99fd7a18acc3fd8b00c7fe28e89f96bc2b5d498bf684887ea99ccea6e38508
MD5 be7c57a866e4f73becbb3c70b0be9dc6
BLAKE2b-256 b0704ef2bf627461b3d7debe7e6fac6ea1ce04b958229606a188000484a25128

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_kit-0.1.6.tar.gz:

Publisher: release-python.yml on nyuta01/folio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file folio_kit-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: folio_kit-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 58.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for folio_kit-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 e9f669f0adfb3161cf26e84a96db0fd3cc9a74efc067daeff1a0c68a0e72275e
MD5 18fe779936aea5d1705695467898572b
BLAKE2b-256 961a69158db016404613901c5f660e97e4f5587d7c444a258f86c9179ae7f5ac

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_kit-0.1.6-py3-none-any.whl:

Publisher: release-python.yml on nyuta01/folio

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page