flutter_python_ml library
Production-ready on-device Machine Learning and direct Python execution bridge for Flutter without external APIs or cloud network dependencies.
Classes
- DartPythonInterpreter
- A lightweight, embedded Python interpreter in pure Dart.
- FlutterPythonMl
- Legacy plugin class for platform info.
- LocalProcessEngine
- Zero-network local process engine that executes Python scripts and calls functions directly on device using standard I/O stream IPC.
- MLPrediction
- Represents the output of a local on-device machine learning inference.
- MockPythonEngine
- In-memory Mock Python ML Engine for instant zero-dependency testing, offline development, and unit test environments.
- ModelInferenceCard
- Pre-built interactive Flutter card for triggering and visualizing on-device Python ML model predictions.
- PlatformChannelEngine
- Platform channel engine communicating with native Android and iOS runners.
- PythonBridge
- The central coordinator bridging Flutter/Dart directly to on-device Python runtimes and ML models without external web APIs or network overhead.
- PythonConsoleView
- Interactive developer console displaying live stdout and stderr streams from on-device Python script execution.
- PythonEngine
- Contract for underlying Python execution engines (Process IPC, Platform Channel, Mock).
- PythonExecutionResult
- Encapsulates the execution outcome of running a local Python script or function.
- PythonML
- Top-level convenience API for quick Python script execution and ML invocation.
- PythonMLModel
- High-level Machine Learning Model abstraction wrapping local Python scripts, preprocessors, weight initializers, and tensor inference pipelines.
- TensorData
- A multi-dimensional tensor container optimized for on-device ML inference, feature engineering, and direct serialization with Python scripts.
- TensorVisualizer
- Renders a multi-dimensional TensorData structure as an interactive numeric grid or bar chart.
Enums
- ModelStatus
- Lifecycle status of an on-device Python Machine Learning model.
- TensorDType
- Data types supported by TensorData.
Exceptions / Errors
- PythonExecutionException
- Thrown when an unhandled Python exception or syntax error occurs.