Skip to main content

Interactive TOML config editor widget for Jupyter and marimo notebooks

Project description

marimo-toml-editor

An interactive TOML config editor widget for Jupyter and marimo notebooks — built with anywidget.

demo

Features

  • 🗂 Tab-per-table navigation — each top-level TOML table is a tab
  • ✏️ Type-aware editors — strings, numbers, booleans (toggle), colors (color picker + hex field)
  • 📋 Rich list editor — per-item rows with reorder (↑↓) and delete
  • 🪆 Inline dict editor — shallow nested tables rendered as compact key-value rows
  • 🏷 Type badges — each key shows its type at a glance (str, int, bool, [], {})
  • 🔍 Search / filter — filter keys within a tab
  • Undo / Redo — full history
  • 💾 Save to disk — requires tomli-w
  • 🌗 Light + dark mode — follows system preference

Install

pip install marimo-toml-editor          # read-only
pip install "marimo-toml-editor[save]"  # with save support (tomli-w)

Usage

In marimo

import marimo as mo
from marimo_toml_editor import TomlConfigEditor

editor = mo.ui.anywidget(TomlConfigEditor("config.toml"))
editor

Access the current data reactively:

editor.value["data"]   # dict with the current TOML contents

In Jupyter

from marimo_toml_editor import TomlConfigEditor

w = TomlConfigEditor("config.toml")
w

Start from a dict (no file)

from marimo_toml_editor import TomlConfigEditor

w = TomlConfigEditor()
w.data = {
    "title": "My App",
    "debug": False,
    "server": {"host": "0.0.0.0", "port": 8080},
    "tags": ["web", "api"],
}

API

Attribute Type Description
data dict Current TOML data (synced)
path str File path (synced)
name str Display name (synced)
status str Last operation status message
Method Description
load(path) Load a TOML file
save(path?) Save to disk (requires tomli-w)

Development

git clone https://github.com/javirm3/marimo-toml-editor
cd marimo-toml-editor
uv run marimo edit examples/demo.py

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

marimo_toml_editor-0.1.0.tar.gz (273.1 kB view details)

Uploaded Source

Built Distribution

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

marimo_toml_editor-0.1.0-py3-none-any.whl (16.5 kB view details)

Uploaded Python 3

File details

Details for the file marimo_toml_editor-0.1.0.tar.gz.

File metadata

  • Download URL: marimo_toml_editor-0.1.0.tar.gz
  • Upload date:
  • Size: 273.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for marimo_toml_editor-0.1.0.tar.gz
Algorithm Hash digest
SHA256 bb2aabdfde743beb6c5a1c960cdb1d7e28fd0da58735b1edb0261d048cf8deb7
MD5 cbcff8899fda25f7cce70c122164773c
BLAKE2b-256 261e40e232ed23853e5e8efda192f6e749a1ea2c066c8a9cd8f4b443b26c5095

See more details on using hashes here.

Provenance

The following attestation bundles were made for marimo_toml_editor-0.1.0.tar.gz:

Publisher: publish.yml on javirm3/marimo-toml-editor

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

File details

Details for the file marimo_toml_editor-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for marimo_toml_editor-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 13269869c0a821ddafedf80d0d33e22ab1be5037b439e9610751be12a48b0390
MD5 6aab06ae938cb5d8b931479663e4ca0a
BLAKE2b-256 aceb9e64506efeb3898961aa73fa2ddb325b1d45ae44db99ab038f71c3dd65fa

See more details on using hashes here.

Provenance

The following attestation bundles were made for marimo_toml_editor-0.1.0-py3-none-any.whl:

Publisher: publish.yml on javirm3/marimo-toml-editor

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