Skip to main content
Open in Kaggle  Open in Colab  Download Notebook
This documentation page is also available as an interactive notebook. You can launch the notebook in Kaggle or Colab, or download it for use with an IDE or local Jupyter installation, by clicking one of the above links.

Problem

You defined a multimodal pipeline in Python and now need to inspect tables, debug computed columns, roll back changes, and expose HTTP endpoints without writing more application code. Jumping into a REPL or building a custom admin UI for every project does not scale, especially when AI agents need stable, machine-readable output.

Solution

What’s in this recipe:
  • Inspect catalogs with pxt ls, describe, columns, and idxs
  • Query and debug rows with pxt rows, count, get, and errors
  • Manage versions with pxt history and pxt revert
  • Script and automate with --json, -f, and pxt shell
  • Write tables and routes in app.py. pxt schema update creates the tables; pxt service diff / update starts HTTP
The pxt CLI ships with Pixeltable (v0.7.4+). Catalog commands talk to a local daemon (~40 ms per call after the first invocation). Write tables in Python, then inspect and serve them from the terminal. See the CLI reference for every flag.

Setup

Step 1: Inspect the catalog

List directories and tables, then drill into schema and computed columns. Flag letters in pxt ls -l: c = computed column, i = index.

Step 2: Query rows

Peek at stored data from the terminal. Pass computed columns explicitly with --cols; unstored computed columns are skipped by default. Thumbnails may take a moment to compute after insert.

Step 3: Debug computed-column failures

When a stored computed column fails, pxt errors lists the failing rows by primary key.

Step 4: Version control

Every insert and schema change creates a new table version. Inspect the timeline, then roll back if needed. See Track changes and revert for the Python API.

Step 5: Agent-friendly scripting

Most catalog commands accept --json for stable, machine-readable output. Use -f to skip confirmation prompts in non-interactive contexts. For many commands in one session, pxt shell keeps the daemon warm:

Step 6: Config and health

Check daemon health, runtime status, and resolved configuration (API keys show as <redacted> when set). See Configure API keys for credential setup.

Step 7: Serve without writing a web app

Write tables and routes in app.py. pxt schema update creates the tables. pxt service example writes a starting file; pxt service diff reports what serving it would change, without starting anything. See HTTP Serving. Full live flow. Use pxt service list for the URL; do not hard-code a port:

Next steps

Last modified on September 3, 2026