Skip to content

A simple in-browser Python editor and executor using Pyodide.

License

Notifications You must be signed in to change notification settings

mkyuone/Inscribe

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

151 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Inscribe Editor

Version License Website TypeScript

Inscribe Editor is a lightweight, in‑browser Python editor and runner powered by Pyodide (WebAssembly). It’s designed to be minimal, fast, and distraction‑free—ideal for learning, experimenting, or running quick Python snippets directly in your browser.

Tip

Inscribe runs fully client‑side and supports blocking input() and time.sleep() when cross‑origin isolation (COOP/COEP) headers are enabled. For local dev, use python3 scripts/serve.py.

👉 Try it online: https://py.mkyu.one
👉 Self‑host with GitHub Pages or any static host.

Highlights

  • In‑browser Python execution via Pyodide (WASM)
  • Blocking input() and time.sleep() with COOP/COEP enabled
  • Focused editor powered by CodeMirror
  • Run full scripts, selections, or # %% cells
  • Console output with basic error highlighting
  • Shareable URLs with compressed code payloads
  • Print/export with layout controls
  • Open/save files using the browser File APIs
  • Editor preferences (font sizes, wrap, execution time, layout, theme)
  • Resizable editor/console split (vertical or horizontal)
  • Persistent settings and draft recovery via localStorage
  • Light/dark/automatic themes with editor + UI styling
Recent changes
  • v3.4: Local version history (diff preview/restore), share link enhancements, and UI polish.
  • v3.3: Runtime UX and settings polish.
  • v3.2: Worker-based runtime for blocking input() and time.sleep(). COOP/COEP headers and local dev server.
  • v3.1: Shareable URLs with compressed code payloads.
  • v3.0: Modular TypeScript source under src/, compiled output to dist/, and fully vendored assets.
Version history (local) implementation details
  • Stored locally in your browser via IndexedDB (no server sync).
  • Autosaves roughly every 15 seconds while you edit (only if content changed).
  • Captures on Run, Save, and when loading shared code.
  • Retention is count-based: keeps up to ~200 edit snapshots and ~120 output entries, then prunes oldest.

Why Inscribe?

Inscribe is intentionally not a full IDE. It’s built to:

  • load quickly
  • stay out of your way
  • run Python safely in the browser
  • feel more like a tool than an app

Perfect for learning, demos, or environments where installing Python isn’t ideal.

Local assets & offline support

  • All external JS, CSS, and fonts are vendored under assets/
  • Pyodide is stored locally at assets/vendor/pyodide/
  • No CDN required — the app works fully offline once loaded

Development

Build TypeScript (emits dist/):

./scripts/build.sh

Serve locally (Pyodide requires HTTP, not file://):

python3 -m http.server

For blocking input() and time.sleep() support, serve with COOP/COEP headers:

python3 scripts/serve.py

About

A simple in-browser Python editor and executor using Pyodide.

Topics

Resources

License

Contributing

Stars

Watchers

Forks