funlesson-api
Funlesson 后端服务,面向教师备课场景:把课程视频链接转成结构化的大纲、思维导图、PPT 和架构图。 核心处理逻辑在 funlesson,这里只是 FastAPI 封装。
配套 Web 界面见 funlesson-web。
功能特性
- 提交课程视频链接,异步处理并可轮询进度
- 产出:转写文字稿、结构化大纲、思维导图(markmap 文本)、PPT(可下载)、架构图(Mermaid 文本)
快速开始
环境要求
同 funlesson 的环境要求:
系统需要 ffmpeg,本机需要已登录的 Claude Code CLI(claude 命令)。
安装
包发布在公开 pypi.org:
pip install funlesson-api
运行
生产/常规用法,funlesson-api 自带服务生命周期命令:
funlesson-api server start --host 0.0.0.0 --port 18812
funlesson-api server status
funlesson-api server stop
funlesson-api server restart
调试用前台模式(--reload 开发时自动重载):
funlesson-api server run --reload --port 18812
也可以不装 CLI、直接用 uvicorn:
uvicorn funlesson_api.main:app --reload --port 18812
server 各命令默认监听 127.0.0.1:18812,--host/--port/--config 可覆盖;
--config 缺省时读 ${XDG_CONFIG_HOME:-~/.config}/farfarfun/funlesson-api/config.toml。
start 写的 PID 文件(server.pid)和日志(server.log)都放在同一个配置目录下。
任务产物默认落盘到 ./data,可通过环境变量 FUNLESSON_DATA_DIR 修改。
从源码开发
pip install -e ../funlesson
pip install -e .
API 文档
见 doc/API.md。
开发指南
pytest
测试通过 monkeypatch 替换 funlesson.pipeline.process,不依赖真实下载/转写/claude 调用。
变更日志
见 CHANGELOG.md。
许可证
MIT
Metadata
Release files for funlesson-api 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| funlesson_api-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for funlesson_api-0.1.5-py3-none-any.whl |
Release files / funlesson_api-0.1.5-py3-none-any.whl
| Download URL | funlesson_api-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
82f3be9effb9297e1572e6be8c66292b0e52d4713b55028d33ce99b8e6d16b02
|
|
BLAKE2b-256 checksum How to use checksums |
ad2905ec3627c99e66874a59621295281e6af79df028cf22064a988321454a11
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.11.17 {"installer":{"name":"uv","version":"0.11.17","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}
|
Security for funlesson-api 0.1.5
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.