chaquopy
0.0.20, released 3 years ago by an unverified publisher
Run Python code and scripts on Android inside Flutter apps using the Chaquopy SDK.
WASM-ready
What it does
Allows Flutter apps to execute Python code on Android devices by wrapping the Chaquopy SDK. It provides functions to run scripts and return outputs or errors as maps.
AI-written summary of version 0.0.20, based on the package's README and metadata. Report an inaccuracy
Use it when
- You need to execute Python scripts or libraries within an Android Flutter application
- You want to leverage Python packages like numpy or scipy inside your app
Skip it when
- You need cross-platform support for iOS (the plugin currently only supports Android)
- You need complex packages like OpenCV or Matplotlib which require special configuration not yet integrated
Strengths
- Enables running Python code directly on Android
- Supports installing Python packages via pip configuration
- Runs Python code on a separate thread with timeout support
Weaknesses
- Only supports Android currently (no iOS support documented)
- Requires complex native Gradle and manifest configurations
- Chaquopy SDK requires a paid license for unlimited use without notifications/time limits
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 0
Requires adding Chaquopy Maven repositories, applying the Chaquopy gradle plugin, modifying defaultConfig with ABI filters, updating the Android manifest with PyApplication, and adding a script.py file.
import 'package:chaquopy/chaquopy.dart';
void runPython() async {
final result = await Chaquopy.executeCode('print("Hello from Python")');
print(result["textOutputOrError"]);
}Alternatives
Packages that do the same job and could replace chaquopy.
- amplitude_flutter
Amplitude Flutter SDK for sending analytics events to Amplitude.
90Compare