How lorisunjunbin/petp works
PET-P is a Python RPA toolkit for authoring and running configurable task workflows. In the main workflow, users configure Executions in the GUI, compose them into Pipelines, and run them; Pipelines invoke Executions, which process Tasks through processors and share results through runtime data. The README also documents headless and portable runtimes, cron scheduling, AI flow generation, MCP, and broad integration processors. Edges are based on the README or shown source/index references; several feature internals were not sampled, so their links are documented at subsystem level.
Main entry points: execution.py Execution engine · pipeline.py Pipeline · PETPPresenter.py GUI presenter · processors Automation processors
Components 22
Workflow authoring
- PET-P GUI
mvp/view/PETPView.py - GUI presenter
mvp/presenter/PETPPresenter.py - AI flow generator
core/ai/ExecutionGenerator.py
Workflow runtime
- Pipeline
core/pipeline.py - Execution engine
core/execution.py - Task model
core/task.py - Processor runtime
core/processor.py - Loop control
core/loop.py - Workflow YAML
core/definition/yamlro.py
Processors and integrations
- Automation processors
core/processors - LLM clients
core/processors/sub/llm - Database adapters
core/processors/sub/dbprocessors
Services and scheduling
- Background runtime
core/runtime/BackgroundRuntime.py - Cron scheduler
core/cron/cron.py - HTTP service
httpservice/HttpServer.py - HTTP request handler
httpservice/handlers/HttpRequestHandler.py - MCP server
httpservice/McpMixin.py - Portable runtime
portable/petp_run.py
Shared support
- Runtime events
mvp/presenter/event/PETPEvent.py
Other components
- Workflow author
- LLM providers
- HTTP clients and agents
Connections 23
- Workflow author → PET-P GUI: authors workflows
- PET-P GUI → GUI presenter: edits workflows
mvp/presenter/PETPPresenter.py - GUI presenter → Pipeline: runs workflows
mvp/presenter/PETPPresenter.py - GUI presenter → AI flow generator: requests generation
mvp/presenter/PETPPresenter.py - AI flow generator → LLM providers: generates flows
- Pipeline → Execution engine: invokes executions
core/pipeline.py - Pipeline → Workflow YAML: saves pipeline
core/pipeline.py - Execution engine → Workflow YAML: loads execution
core/execution.py - Execution engine → Task model: processes tasks
core/execution.py - Execution engine → Processor runtime: creates processors
core/execution.py - Execution engine → Loop control: controls loops
core/execution.py - Processor runtime → Automation processors: dispatches tasks
core/processors/CREATE_SFTP_CLIENTProcessor.py - Automation processors → LLM clients: uses clients
- Automation processors → Database adapters: uses adapters
- Background runtime → Pipeline: runs workflows
core/runtime/BackgroundRuntime.py - Background runtime → Cron scheduler: manages schedules
core/runtime/BackgroundRuntime.py - HTTP service → HTTP request handler: routes requests
httpservice/HttpServer.py - HTTP service → MCP server: serves MCP
httpservice/HttpServer.py - HTTP clients and agents → HTTP service: sends requests
- MCP server → HTTP clients and agents: exposes tools
- Portable runtime → Execution engine: runs executions
- Execution engine → Runtime events: publishes events
core/execution.py - LLM clients → LLM providers: calls providers