Skip to main content

framejs

An anywidget for embedding framejs frames (and metapage URLs) in Jupyter and marimo notebooks.

Renamed in 0.4.0. This package was published as metaframe-widget, and the class as MetaframeWidget. Both names still work — metaframe-widget now installs this package, and MetaframeWidget is an alias of Frame — but new code should use framejs and Frame.

Install

pip install framejs

With environment extras:

pip install "framejs[jupyter]"   # includes jupyterlab
pip install "framejs[marimo]"    # includes marimo

Quick start

Jupyter

from framejs import Frame

w = Frame(url="https://framejs.io/#?js=...", height="300px")
w

marimo

import marimo as mo
from framejs import Frame

w = Frame(url="https://framejs.io/#?js=...", height="300px")
mo.ui.anywidget(w)

A widget is always created from a URL. To embed your own code, build and save it at framejs.io — the editor mints a short URL you can paste into url=. The URL is the portable, saveable form of a frame; the code itself lives behind it rather than being inlined in your notebook.

URL forms

Any of these work as url=:

# Raw / full URL — the code is inlined in the hash (can get very long)
Frame(url="https://framejs.io/#?js=...")

# Expiring snapshot — content-addressed, kept ~30 days, then garbage-collected
# (editor: "Create expiring snapshot")
Frame(url="https://framejs.io/j/<sha256>")

# Durable, editable frame — permanent, tied to your account (editor: "Save")
# Paste either host: a framejs.app/j/<uuid> URL is loaded from framejs.io, the
# runtime that serves frames with CORS headers (a notebook cannot load the
# framejs.app one directly). `w.url` still reads back what you passed.
Frame(url="https://framejs.app/j/<uuid>")

Prefer the durable /j/<uuid> form in notebooks you keep. See Short URLs for the full comparison.

API reference

Parameter Type Default Description
url str "" Full frame URL (including hash params)
inputs dict {} Dict of inputs to push to the frame
outputs dict {} Dict of outputs received from the frame (read-only)
width str "100%" CSS width for the widget container
height str "400px" CSS height for the widget container
allow str "" iframe allow attribute (e.g. "camera; microphone")

Methods

  • set_inputs(d) — merge a dict into current inputs
  • set_input(key, value) — set a single input key
  • on_outputs_change(callback) — register a callback for output changes
  • on_saved_url_change(callback) — register a callback for when the user creates an expiring snapshot (/j/<sha256>) inside the widget
  • pipe_to(target, output_key, input_key=None) — connect an output to another widget's input

Piping widgets

source = Frame(url="...")
sink = Frame(url="...")
source.pipe_to(sink, output_key="result", input_key="data")

No anywidget? Use a plain iframe

To send data into a frame and nothing more, you need no package at all — encode the inputs into the URL and show it with IPython.display.IFrame. See the Jupyter guide.

Metadata

Release files for framejs 0.4.0

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

Source distribution (sdist)

Source distribution for framejs 0.4.0
File Size Uploaded
framejs-0.4.0.tar.gz 10.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for framejs 0.4.0
File Interpreter ABI Platform
framejs-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 19.7 kB

Release files / framejs-0.4.0.tar.gz

Download URL framejs-0.4.0.tar.gz
Size 10.1 kB
Tags Source
SHA-256 checksum
How to use checksums
037f873aa62f74a4e176baf64cc89f5813141b12c47755863cea44b7ee2b7f36
BLAKE2b-256 checksum
How to use checksums
7548a268aeaeae290fb8e5b87684e5d831b48b59ee495665acc2bdb42dcc45a2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 6, 2026.

Transparency log

Release files / framejs-0.4.0-py3-none-any.whl

Download URL framejs-0.4.0-py3-none-any.whl
Size 9.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6dec7a344adde59b85007f3988db34807bf844d571b877778ba707b4022bfc69
BLAKE2b-256 checksum
How to use checksums
719a3b39fc8ea6b82a99f628be9b3b3d29692c0ac0b040518af0084d0c1e2c97
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Oct 6, 2026.

Transparency log

Release history Release notifications | RSS feed

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

This release

0.4.0 This release

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