Fane
Fane 是一个本地运行的账单转换器:读取支付宝 CSV、微信 XLSX,按照 YAML 规则映射 Beancount 账户,并输出或直接写入月度账本。
它不会替代 Beancount,也不会联网同步账单。它解决的是“第三方账单到规范分录” 这一步。
兼容性
现有命令和默认行为保持不变:
fa --config ~/.flow/config.yaml trans --provider alipay --source bill.csv
fa --config ~/.flow/config.yaml import --provider wechat --source bill.xlsx \
--journal-dir ~/.flow/account/journal
trans默认仍输出原有的按支出/收入和月份分组的 JSON。import默认仍将支出写入YEAR/YEAR-MM.bean,收入写入YEAR/income.bean。- 默认配置仍是
~/.flow/config.yaml。 - 原有 YAML 字段继续接受;
doctor只报告兼容性警告,不会修改配置。
安装
在源码目录创建虚拟环境并安装:
python3 -m venv .venv
.venv/bin/python -m pip install -e .
.venv/bin/fa --version
也可以继续直接运行源码入口:
.venv/bin/python main.py --help
五分钟开始
创建最小配置:
fa init
fa doctor
只读检查账单,不写文件:
fa inspect --provider alipay --source bill.csv
预览 Beancount:
fa trans --provider alipay --source bill.csv --format beancount
先 dry-run,再正式导入:
fa import --provider alipay --source bill.csv \
--journal-dir ~/.flow/account/journal --dry-run
fa import --provider alipay --source bill.csv \
--journal-dir ~/.flow/account/journal --summary --require-classified
已经有每日账单脚本时,可在配置中增加 jobs,让 Fane 自己完成多来源增量导入:
fa --config ~/.flow/bill.yaml sync daily --dry-run
fa --config ~/.flow/bill.yaml sync daily
sync 提供文件变化检测、交易指纹去重、按交易日期路由、并发锁、失败回滚和账本校验;
完整配置及从现有 Bash 脚本迁移的方法见功能使用手册第 9 节。
完整命令、规则字段、输出格式、去重与兼容说明见 功能使用手册。项目内部架构见 项目导览。
验证
.venv/bin/python -m unittest discover -s tests -v
.venv/bin/python -m compileall -q ir package provider tests
example/ 是本地账单目录,不进入 Git;测试在它存在时执行额外冒烟验证,不存在时
自动跳过,版本化单元测试仍会正常运行。
Metadata
Release files for Fane 1.4.10
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 |
|---|---|---|---|---|
| fane-1.4.10.tar.gz | 41.3 kB | Without provenance | Details for fane-1.4.10.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fane-1.4.10-py3-none-any.whl | Python 3 | none | any | Details for fane-1.4.10-py3-none-any.whl |
Total release size: 88.8 kB
Release files / fane-1.4.10.tar.gz
| Download URL | fane-1.4.10.tar.gz |
|---|---|
| Size | 41.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
04ce72413279b444e9c8e79d6d88e2aed644e04b28e04c9930aa6aa138bb8856
|
|
BLAKE2b-256 checksum How to use checksums |
8b384d37f712e1e8a3745aced8c847e774737a0a07cf994a1e54fe7961f6b506
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / fane-1.4.10-py3-none-any.whl
| Download URL | fane-1.4.10-py3-none-any.whl |
|---|---|
| Size | 47.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2fef431faf6cae1d7548779801cdaba8ab16a351aa95a22025616fd076943f61
|
|
BLAKE2b-256 checksum How to use checksums |
2a3274736b69c1d960cfe5b568f103bf641b444576aff9c2f11baba1e90c1f68
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Security for Fane 1.4.10
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.