serious_python
6.1.3, released 3 weeks ago by flet.dev
A cross-platform plugin for embedding a Python runtime into Flutter applications.
What it does
Embeds a CPython runtime into mobile and desktop Flutter apps so you can run Python code in the background without blocking the UI. It provides a CLI tool to package your Python application, dependencies, and interpreters for native platforms or web.
AI-written summary of version 6.1.3, based on the package's README and metadata. Report an inaccuracy
Use it when
- You want to run heavy lifting tasks, data processing, machine learning, or AI written in Python inside a Flutter app
- You need to host an application backend service in Python locally inside the mobile or desktop app
Skip it when
- You need direct, synchronous Dart-to-Python function calls instead of communicating via local REST, sockets, or files
- You are building a lightweight pure-Dart application without any Python codebase requirement
Strengths
- Cross-platform support for iOS, Android, macOS, Linux, and Windows
- Runs Python programs on a background thread so the Flutter UI stays responsive
- CLI tool simplifies packaging Python apps and third-party requirements
Weaknesses
- Requires manual CLI packaging steps and specific environment variable configurations
- Communication between Dart and Python must occur via an API provided by the Python program (like REST or sockets) rather than direct function calls
- Platform support requires minimum OS versions like iOS 15.0 and macOS 12.0
Setup
- Kind
- Plugin (native code)
- Effort
- High
- Code generation
- No
- Direct dependencies
- 15
Requires setting minimum iOS deployment targets (platform :ios, '15.0'), using the CLI tool to package Python requirements, and configuring environment variables like SERIOUS_PYTHON_VERSION.
SeriousPython.run();Works with
Packages commonly used together with serious_python: ones it builds on, ones built on it, and its own family.
- archiveserious_python depends on itEncodes and decodes archive and compression formats such as zip, tar, gzip, and zlib.
- cryptoserious_python depends on itProvides SHA, MD5, and HMAC hashing functions for Dart.
- globserious_python depends on itA file and directory globbing library that supports Bash-style path matching and listing.
- package_configserious_python depends on itRead and write Dart package configuration files.
- shelfserious_python depends on itComposable web server middleware for Dart
- ffiserious_python depends on itUtilities for working with Foreign Function Interface (FFI) code in Dart.
- argsserious_python depends on itLibrary for parsing raw command-line arguments into options and values using GNU and POSIX styles.
- path_providerserious_python depends on itProvides Flutter APIs to locate common filesystem directories on Android, iOS, macOS, Linux and Windows.