2

🐍 Feature Request: Python Interpreter in Tasker

Summary

Add support for running Python code natively inside Tasker tasks, similar to the current Java interpreter, to give users a broader scripting option.

Why This Matters

Ease of Use: Python is widely regarded as simpler and more readable than Java, making it more approachable for beginners while still powerful for advanced users.

Ecosystem Power: With its vast standard library and third-party packages, Python enables advanced automations like data analysis, machine learning, web APIs, and IoT device control directly from Tasker.

Community Adoption: Python has one of the largest developer communities, meaning Tasker could benefit from a huge ecosystem of scripts and user-contributed automation snippets.

Implementation Ideas

1. Embedded Interpreter: Bundle a lightweight Python runtime within Tasker for self-contained functionality.

2. External Integration: Provide hooks for Tasker to call into existing Python environments (e.g., Termux, PyDroid, or QPython), reducing app size while still empowering advanced users.

3. Hybrid Approach: Default to lightweight built-in support for basic scripts, but allow optional linking to full-featured Python installations for heavy-duty automation.

Use Cases

Parse and manipulate JSON or XML with fewer steps.

Control smart home devices using Python libraries (MQTT, Home Assistant APIs).

Perform advanced math and data analysis directly in tasks.

Run machine learning models or lightweight AI scripts on-device.

Impact

Adding a Python interpreter would take Tasker’s flexibility to the next level, making it not just an automation tool, but a true scripting hub for Android power users.

1 reply

A

You can run Python scripts by Termux plugin. In Termux plugin you should set path to Python in Executable like this /data/data/com.termux/files/usr/bin/python and path to your script in Arguments like this "/storage/emulated/0/YourFolder/main.py" %action "%params"

Task: Run Python Script

A1: Termux [
     Configuration: /data/data/com.termux/files/usr/bin/python "/storage/emulated/0
     
     Working Directory βœ•
     Stdin βœ•
     Custom Log Level null
     Termi
     Timeout (Seconds): 10
     Structure Output (JSON, etc): On ]

A2: Input Dialog [
     Title: Python
     Text: [Output]
     %stdout
     [Error]
     %stderr
     %result
     Close After (Seconds): 30 ]