Browse by type
A tool for running automated to-do lists (workflows) on your Python projects. It's built to work anywhere, especially on your android phone.
Parslet is a tiny workflow engine built in Python. That means it's a tool that helps you automate tasks in a specific order, especially on phones and devices that can’t run heavy-duty software. Think of it like a smart to-do list for your computer or phone, but instead of reminding you to do things, it actually does them for you in the right order, automatically.
Imagine this real-world example:
You run a small juice business with your best friend. Every morning you:
Now imagine you could automate this entire process using a small robot. You just tell it the steps once, and it does them every morning, in order. You get to spend quality time with your best friend.
That’s what Parslet does, but for software tasks.
In a real-world tech setting, you could use Parslet to:
All of this, in the right order, without you needing to supervise it.
Most tools like this are built for powerful servers in a data center. Parslet is different. It’s designed from the ground up to:
It uses something called a DAG (Directed Acyclic Graph), which is just a technical way of saying:
“Step B only runs after Step A is done.”
You define these steps (we call them Tasks) in a simple Python file. Parslet reads your file, understands the order, and handles the rest. It manages failures and runs everything as efficiently as possible.
Ready to try it? You can be up and running in less than a minute.
Install It:
The easiest way to install Parslet is directly from PyPI.
bash
pip install parslet
For Developers (or to get the latest changes):
If you want to contribute or get the very latest code, you can install it from the source.
bash
git clone https://github.com/Kanegraffiti/Parslet.git
cd Parslet
pip install -e .
Create Your First Workflow
Create a new file called my_first_workflow.py and paste this in. This is your recipe, telling Parslet what to do.
```python from parslet import parslet_task, ParsletFuture from typing import List
@parslet_task def say_hello(name: str) -> str: print(f"Task 1: Saying hello to {name}") return f"Hello, {name}!"
@parslet_task def make_it_loud(text: str) -> str: print("Task 2: Making the text loud!") return f"{text.upper()}!"
main() by default, or you can use @parslet_workflow.def main() -> List[ParsletFuture]: # First, we tell Parslet to run the say_hello task. # It doesn't run yet! It just gives us an "IOU" for the result. greeting_iou = say_hello("Parslet")
# Next, we give the "IOU" from the first task to the second task.
# This tells Parslet: "Wait for task 1 to finish before starting task 2."
loud_greeting_iou = make_it_loud(greeting_iou)
# We return the very last IOU. This tells Parslet, "We're done when this is done."
return [loud_greeting_iou]
```
Run It
Now for the fun part. Tell Parslet to run your new workflow.
bash
parslet run my_first_workflow.py
You'll see the print statements from your tasks as they run, in the correct order 🎉
You can also reference a workflow by module path and tweak execution:
parslet run my_package.workflow:main --max-workers 4 --json-logs --export-stats stats.json
Parslet is small, but it's packed with neat features for real-world use.
--battery-mode to tell Parslet to take it easy and conserve power. Read about battery mode.@parslet_task(allow_shell=True) only when needed. Learn more in the security notes.Concierge Mode & Context Scenes: parslet run --concierge gives you a luxury pre-flight briefing, live context audit, and a polished post-run ledger. Combine it with @parslet_task(contexts=[...]) to ensure tasks only run when the right battery, network, or time-of-day scene is active.
Parallel by default: Independent tasks run side-by-side whenever dependencies allow, so multi-core phones/tablets finish faster.
parslet contexts to inspect active detectors (network.online, power.ac, etc.) and current battery level.parslet cache list to inspect cache files and parslet cache clear to reclaim storage.Want to see more? Check out the use_cases/ and examples/ folders for more advanced recipes!
Parslet does not run everything one-by-one. If two tasks are independent, they run in parallel:
from parslet import parslet_task, ParsletFuture
from typing import List
import time
@parslet_task
def fetch_prices() -> str:
time.sleep(2)
return "prices"
@parslet_task
def fetch_inventory() -> str:
time.sleep(2)
return "inventory"
@parslet_task
def combine(a: str, b: str) -> str:
return f"{a}+{b}"
def main() -> List[ParsletFuture]:
a = fetch_prices()
b = fetch_inventory()
c = combine(a, b)
return [c]
With parallel execution, total runtime is near ~2s (+overhead), not ~4s, because fetch_prices and fetch_inventory run together.
Parslet can generate a picture of your workflow (a "DAG") to help you see how your tasks are connected. This is great for debugging and documentation.
To use this feature, you need to have Graphviz installed on your system.
Parslet 0.6.1 introduces Concierge Mode, a premium orchestration experience that makes your workflow feel like it shipped with its own operations team.
parslet run my_flow.py --concierge to get a handcrafted pre-flight report. It shows which context detectors are live (battery, network, VPN, time-of-day) and which tasks are gated by those contexts.Context Scenes: Declare contextual requirements directly on tasks:
python
@parslet_task(contexts=["network.online", "battery>=60"], name="sync_to_vault")
def sync_to_vault(payload: dict) -> None:
upload(payload)
Parslet will defer the task with a DEFERRED status if the context isn't satisfied, protecting your workflow just like the best Tasker rule sets—only with readable Python and offline detectors.
Manual Overrides: Activate ad-hoc scenes with parslet run my_flow.py --context evening --context wifi. You can also set a PARSLET_CONTEXTS="evening,wifi" environment variable or programmatically enable custom detectors using ContextOracle.
--concierge-runbook runbook.json and Parslet will record the complete itinerary, task metadata, and execution timings in a JSON dossier.This combination gives Parslet the runway to outclass traditional mobile automation apps—every run feels bespoke, intentional, and enterprise ready.
sudo apt install graphvizsudo dnf install graphvizpkg install graphvizYou will also need the pydot Python package, which is included in requirements.txt.
Once Graphviz is installed, you can use the --export-png flag with the run command:
parslet run my_first_workflow.py --export-png my_workflow.png
This will create an image file named my_workflow.png showing your workflow.
use_cases/solar_scheduling.py — reads solar panel efficiency data and proposes cleaning/maintenance schedules. Offline-friendly and battery-aware.use_cases/offline_crop_diagnosis.py — runs local crop checks without constant internet connectivity.use_cases/triage_tool.py — lightweight triage flow for constrained clinics or field deployments.use_cases/shared_hub_jobs.py — orchestrates shared community-hub compute jobs on limited hardware.We've written down everything you need to know in a simple, friendly way.
We'd love your help making Parslet even better. It's easy to get started. Check out our Contributing Guide.
Install dependencies and run the checks:
pip install -e .[dev]
pip install -r requirements-dev.txt
ruff parslet/core/__init__.py tests/test_imports.py
black --check parslet/core/__init__.py tests/test_imports.py
mypy
pytest -q
Parslet ships with experimental bridges for Parsl.
Use parsl_python to call a Parsl python_app as a Parslet task:
from parslet.core.parsl_bridge import parsl_python
@parsl_python
def add(x, y):
return x + y
The returned add function behaves like a regular @parslet_task and can
participate in a Parslet DAG while executing the body via Parsl.
This project is licensed under the MIT License. See LICENSE for the full text.
Inspired by the powerful Parsl project.
A big thank you to the Outreachy community and the Parsl maintainers.
$ claude mcp add Parslet \
-- python -m otcore.mcp_server <graph>