Monty API — Dart

Provide a Dart interface for executing Python code via FFI and WASM backends.

5|4|Updated Feb 21, 2026
One-click install
npx skills add https://github.com/runyaga/dart_monty --skill monty-api-dart
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: Monty API — Dart
Source: https://github.com/runyaga/dart_monty/tree/main/docs
Command: npx skills add https://github.com/runyaga/dart_monty --skill monty-api-dart

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Dart developers need a robust way to run Python code and access host functions from Dart apps, without leaving the Dart toolchain.

Core Features & Use Cases

  • Run API for single-shot Python execution with structured results.
  • Iterative/external function execution via MontyBridge, including pause/resume cycles.
  • Cross-backend parity between native FFI and Web WASM for consistent behavior.
  • Introspection and error handling with MontyException and stack traces.

Quick Start

Install the Monty API package for Dart and run a simple Python expression using Monty.run to verify end-to-end execution.

Frequently Asked Questions about Monty API — Dart

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I run Python code inside a Dart or Flutter app?

You can embed Python in Dart by using a sandboxed interpreter bridge that executes scripts safely and returns structured results back to the host environment.

Can I call Dart host functions from a running Python script?

Yes, you can call Dart host functions from Python by using an external function bridge that supports iterative execution, enabling pause and resume cycles for active script communication.

Does the Python sandbox bridge work on both native FFI and Web WASM?

Yes, the Python sandbox bridge maintains cross-backend parity between native FFI and Web WASM, ensuring consistent script execution behavior across desktop and web Dart applications.

How are Python errors and stack traces handled when executing from Dart?

Python errors are handled through a dedicated exception class that captures stack traces, allowing Dart applications to perform introspection and structured error handling on failed script executions.

What is the best way to execute a single Python expression from Dart?

The best way to execute a single Python expression from Dart is using the run API for single-shot execution, which evaluates the expression and marshals the result back to the host application.