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.5.tar.gz (283.1 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.5-py3-none-any.whl (57.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: folio_kit-0.1.5.tar.gz
  • Upload date:
  • Size: 283.1 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.5.tar.gz
Algorithm Hash digest
SHA256 0d9a8495d7e2905d012d8d8a00e3eb8c33d86ac5708a25d73776c7d97af221e7
MD5 f4e06bdd894ef6f6544fc2753f90598d
BLAKE2b-256 67af01b41d77bb04f1471b49c0bd80191aa7a7fa2cc388ac14568f547dbecd4c

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_kit-0.1.5.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.5-py3-none-any.whl.

File metadata

  • Download URL: folio_kit-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 57.5 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d8d0a5e09d131d268cf8f54066a3f919a83912634e8a54ccd3cc321bb819d691
MD5 77680b6b6ffd76c586eb2dc274631289
BLAKE2b-256 8dcd8e38bf8066f2a2c95de858aea96965d42065c8a3f62c48964711892f2f32

See more details on using hashes here.

Provenance

The following attestation bundles were made for folio_kit-0.1.5-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