FlowDeck
现代化 Python 任务调度框架:APScheduler 的 Web 控制台,plombery 的完美替代(兼容其 Python API)。
中文
代码即配置的 Python 调度框架。FastAPI + Vue3,Web 控制台已内置在 Python 包中——无需 Node 环境,pip install 后开箱即用。
核心能力
- 代码即配置:
@task定义任务、register_pipeline(...)注册流水线,Cron / Interval 触发器随代码声明 - Web 控制台:仪表盘、流水线管理、实时日志终端、运行统计图表、停机日历、通知规则管理,全部内置
- 界面配置任务:SQL / 存储过程任务直接在 Web 上编写,保存即热注册进调度器(免重启)
- 补数与重跑:指定历史日期区间逐日回填(
${data_date}自动覆盖);失败 run 一键重跑整条或从失败任务断点续跑 - 暂停留痕:UI 暂停后定时触发记为 SKIPPED(有迹可查),手动触发不受影响,重启后状态保持
- 停机日历:节假日 / 维护窗口按日期区间自动跳过定时触发,手动运行与补数不受影响
- 失败告警:failed / succeeded / timeout / missed / skipped / alert 六类事件推送到 webhook(企业微信模板开箱即用,任务结果表格可转图片直发企微)
- 漏跑巡检:每小时自动对比「预期触发数 vs 实际运行数」,漏跑即告警
- 本地时间:日志与数据库统一使用本地时区(根修 plombery 的 UTC 缺陷)
安装
pip install flowdeck
数据库驱动按需安装(包本体不预装任何驱动):
pip install "flowdeck[postgres]" # psycopg[binary]
pip install "flowdeck[mssql]" # pyodbc(还需系统级 ODBC Driver)
pip install "flowdeck[mysql]" # pymysql
要求 Python >= 3.10。
快速开始
验证安装(纯控制台模式)
flowdeck # 默认 127.0.0.1:8655
flowdeck --host 0.0.0.0 --port 9000
启动后访问 http://127.0.0.1:8655(API 文档见 /docs)。
flowdeck命令只启动「控制台 + 调度器」,不加载业务流水线,适合验证安装、查看历史运行数据、管理通知规则。
编写流水线
from pydantic import BaseModel
from flowdeck import task, register_pipeline, Trigger
class ReportParams(BaseModel):
data_date: str
@task
def extract(params: ReportParams):
return {"rows": 100}
@task
def load(params: ReportParams, ctx):
rows = ctx.get_upstream_output("extract")["rows"]
ctx.logger.info(f"入库 {rows} 行")
register_pipeline(
id="daily_report",
name="日报",
tasks=[extract, load],
params=ReportParams,
triggers=[Trigger(cron="0 8 * * *")],
)
入口文件末尾启动:
from flowdeck.cli import main
main()
运行入口文件即拥有 Web 控制台(http://127.0.0.1:8655)+ 调度器 + 你的全部流水线。
与 plombery 的关系
FlowDeck 兼容 plombery 的 Python API(register_pipeline / @task / Trigger 签名一致),并在此基础上扩展了超时控制、并发策略(parallel / skip / cancel_previous)、通知规则、停机日历、补数回填等能力,可直接替换。
English
A configuration-as-code Python scheduling framework. FastAPI + Vue3, with the web console embedded in the Python package — no Node.js required, ready to use right after pip install.
Key Features
- Code as configuration: define tasks with
@task, register pipelines withregister_pipeline(...), declare Cron / Interval triggers in code - Web console: dashboard, pipeline management, real-time log terminal, run statistics charts, downtime calendar, notification rules — all built in
- Configure tasks in the UI: write SQL / stored-procedure tasks directly on the web page; saving hot-registers them into the scheduler (no restart)
- Backfill & rerun: backfill a historical date range day by day (
${data_date}is overridden automatically); rerun a failed run entirely or resume from the failed task - Pause with audit trail: pausing from the UI marks scheduled triggers as SKIPPED (traceable); manual triggers are unaffected; state survives restarts
- Downtime calendar: skip scheduled triggers for holidays / maintenance windows by date range (all pipelines or selected ones); manual runs and backfills are unaffected
- Alerting: six event types (failed / succeeded / timeout / missed / skipped / alert) pushed to webhooks (WeCom template out of the box; task result tables can be rendered as images and sent directly to WeCom)
- Missed-run patrol: hourly comparison of expected vs actual trigger counts, alerting on any miss
- Local time: logs and database use the local timezone (fixing plombery's UTC flaw at the root)
Installation
pip install flowdeck
Install database drivers as needed (the package itself ships none):
pip install "flowdeck[postgres]" # psycopg[binary]
pip install "flowdeck[mssql]" # pyodbc (also requires a system ODBC Driver)
pip install "flowdeck[mysql]" # pymysql
Requires Python >= 3.10.
Quick Start
Verify the installation (console-only mode)
flowdeck # defaults to 127.0.0.1:8655
flowdeck --host 0.0.0.0 --port 9000
Then open http://127.0.0.1:8655 (API docs at /docs).
The
flowdeckcommand starts only the console + scheduler without any business pipelines — ideal for verifying the installation, browsing historical runs, and managing notification rules.
Writing pipelines
from pydantic import BaseModel
from flowdeck import task, register_pipeline, Trigger
class ReportParams(BaseModel):
data_date: str
@task
def extract(params: ReportParams):
return {"rows": 100}
@task
def load(params: ReportParams, ctx):
rows = ctx.get_upstream_output("extract")["rows"]
ctx.logger.info(f"Loaded {rows} rows")
register_pipeline(
id="daily_report",
name="Daily Report",
tasks=[extract, load],
params=ReportParams,
triggers=[Trigger(cron="0 8 * * *")],
)
Start at the end of your entry file:
from flowdeck.cli import main
main()
Running the entry file gives you the web console (http://127.0.0.1:8655) + scheduler + all your pipelines.
Relation to plombery
FlowDeck is API-compatible with plombery (register_pipeline / @task / Trigger signatures are identical) and extends it with timeout control, concurrency strategies (parallel / skip / cancel_previous), notification rules, a downtime calendar, and backfilling — a drop-in replacement.
License / 许可证
MPL-2.0. Commercial use is permitted; modifications to this project's source files must be made available under MPL-2.0 with changes marked. / 允许商业使用;对本项目源码文件的修改必须以 MPL-2.0 开源并标注改动。
Metadata
Release files for flowdeck 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flowdeck-0.2.1.tar.gz | 1.2 MB | Without provenance | Details for flowdeck-0.2.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flowdeck-0.2.1-py3-none-any.whl | Python 3 | none | any | Details for flowdeck-0.2.1-py3-none-any.whl |
Total release size: 2.4 MB
Release files / flowdeck-0.2.1.tar.gz
| Download URL | flowdeck-0.2.1.tar.gz |
|---|---|
| Size | 1.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
83758e06bcd25ae78a92602e39da6c18c25519160a5743bebdebcc8fb3a6f283
|
|
BLAKE2b-256 checksum How to use checksums |
c1e417873e8dfc267a3ea258c545a5df8d101708eb157571c44a9d313b788d1a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Release files / flowdeck-0.2.1-py3-none-any.whl
| Download URL | flowdeck-0.2.1-py3-none-any.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
46b98091f4f1285e7662e353e8671d0dbd775b515d1531b6251f17cf0cf6953e
|
|
BLAKE2b-256 checksum How to use checksums |
ec18c107a32ba9eb03e8d6d1917c50b094d56b2e8d9e0de7f611808d6abe1b81
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.11.9
|
Security for flowdeck 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.