liuyao-chart
确定性六爻排盘库:输入六次起卦爻值(初爻到上爻,6/7/8/9)和起卦时刻,输出装卦、
纳甲、六亲、六神、世应、伏神与变卦的带版本号 JSON(liuyao_chart.v1)。
纯 Python,无 FastAPI / 数据库 / LLM 依赖;日历后端为
lunar-python(Windows 下 sxtwl
目前编译不过,故不作为依赖)。排盘规则改编自
yaomancy/liuyao-engine 0.1.0
(Apache-2.0),见 NOTICE。
安装
pip install liuyao-chart
使用
from datetime import datetime
from zoneinfo import ZoneInfo
from liuyao_chart import auto_lines, cast
chart = cast(
lines=[7, 8, 9, 7, 6, 8], # 初爻到上爻;6=老阴 7=少阳 8=少阴 9=老阳
at=datetime(2026, 10, 27, 14, 30, tzinfo=ZoneInfo("Asia/Shanghai")),
)
chart.model_dump(mode="json") # liuyao_chart.v1,可直接给前端渲染
chart.to_text() # 纯文本卦盘
cast(lines=auto_lines(), at=...) # secrets 模拟三钱法自动起卦
at 必须是带时区的 datetime。默认按它自带的 IANA 时区(ZoneInfo)换算
四柱;如果用的是固定偏移(datetime.timezone(timedelta(hours=8))),需要
另外传 timezone="Asia/Shanghai",否则会报错。
默认口径
- 日界:子初换日(23:00 起日柱进次日),与参考引擎一致。
- 年柱界:lunar-python 默认(立春换年柱)。
- 变卦六亲:一律按本卦宫五行取,兼容历史存储数据(见
LiuyaoChart.align_changed_relatives)。
输出契约
schema_version 固定为 liuyao_chart.v1,JSON Schema 随包发布于
liuyao_chart/schema/liuyao_chart.v1.json。字段有破坏性变更时升级到 v2。
许可证
Apache-2.0。改编规则的第三方声明见 NOTICE。
Metadata
Release files for liuyao-chart 0.1.0
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 |
|---|---|---|---|---|
| liuyao_chart-0.1.0.tar.gz | 19.8 kB | With provenance | Details for liuyao_chart-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| liuyao_chart-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for liuyao_chart-0.1.0-py3-none-any.whl |
Total release size: 37.4 kB
Release files / liuyao_chart-0.1.0.tar.gz
| Download URL | liuyao_chart-0.1.0.tar.gz |
|---|---|
| Size | 19.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
968565d8141242cd080285d71e24319ba41632f4b6fa225cdc94aa5eed9876ff
|
|
BLAKE2b-256 checksum How to use checksums |
b575d0b715ef73581e5e959be4bb717ca45778372f9c9ba8053ada38286d84f9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logRelease files / liuyao_chart-0.1.0-py3-none-any.whl
| Download URL | liuyao_chart-0.1.0-py3-none-any.whl |
|---|---|
| Size | 17.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
21f977e9fc9a0e39b45368b61894aa406072962ac9fda20efc2f9853a37a95cf
|
|
BLAKE2b-256 checksum How to use checksums |
5017c212e823781ea6cef650129dd3627626c014e9c1944f928c060fb5e0cc17
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logSecurity for liuyao-chart 0.1.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for liuyao_chart-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 28, 2026.
Transparency logA 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.