ziwei
Python 紫微斗数排盘与知识库。历法与时间由 celestial-calendar 提供;本仓记录紫微斗数的安星规则、 四化口径、流派变体与出处,并组织可复现的命盘结果。
目前提供出生记录、显式口径配置、民用时刻消歧、干支基础、celestial 历法适配、解析层 (公历/农历记录到计算输入)、命宫身宫与十二宫、五行局、28星安星、具名生年四化与大限, 以及完整命盘组合、带版本的JSON保存/恢复、重算、文本十二宫格和独立知识目录。 用法见出生输入、历法与时间、解析层、 命宫身宫与十二宫、五行局、安星、 四化与大限、完整命盘与记录和知识查询, 开发检查与协作约定见参与开发。 首次发布的前置配置、审批与产物核验见发布准备。
当前源码为首版候选,版本号不表示已经上架PyPI;已发布版本以 发布记录为准。
安装要求
支持Python 3.11–3.14。运行时精确依赖celestial-calendar==0.8.0与tzdata==2026.5。
celestial-calendar 0.8.0在PyPI只提供下列原生wheel,没有源码分发包;ziwei自身的纯Python wheel不扩大这个范围:
| 平台 | 架构与最低系统要求 |
|---|---|
| macOS | arm64,macOS 14或更新 |
| Linux | x86_64,glibc 2.26或更新;aarch64,glibc 2.24或更新 |
| Windows | amd64 |
Intel macOS、Windows ARM64、较旧macOS和musl Linux不在上述制品覆盖范围内,不能依靠pip自动回退源码构建。 请使用独立虚拟环境;与不同精确版本的celestial-calendar或tzdata显式共装会冲突。 安装ziwei时,pip也可能将环境中已有的较新celestial-calendar或tzdata降到上述精确版本。 当前源代码开发安装与检查见参与开发,版本与首次发布仍以发布记录为准。
首版目标
已知出生时刻与性别,排出可复现的本命盘:
- 保存出生原始记录,显式处理时区与可选的真太阳时,保留解析后的农历年月日时与所用历法算法。
- 闰月归属、子时换日、换年三个口径作为具名配置,不设静默默认。
- 安命宫、身宫与十二宫宫干,定五行局,安紫微、天府两系十四主星。
- 安六吉、六煞、禄存与天马;按所选具名四化表取生年四化。
- 起大限:顺逆由年干阴阳与性别定,首限起始虚岁由五行局数定。
- 输出不可变结构、文本盘面与带版本的序列化,保留输入、口径、历法版本与派生结果。
交付任务与验收见 v0.1.0 milestone。
设计边界
首版同时支持独立查知识:不排盘、不加载原生历法库,也能查到星曜、宫位、四化等概念, 以及安星规则的流派变体与出处。来源核验状态、适用前提与展示资格分别记录。
通用概念用惯用英语,术数专有词用拼音,枚举另有中文别名;文档、issue 与 PR 使用中文。
后续方向
这些 milestone 记录方向,不设发布日期。每项技术在实现前须明确定义、出处与参考盘例。
许可证
MIT。
Metadata
Release files for ziwei 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 | |
|---|---|---|---|---|
| ziwei-0.1.0.tar.gz | 276.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ziwei-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 350.4 kB
Release files / ziwei-0.1.0.tar.gz
| Download URL | ziwei-0.1.0.tar.gz |
|---|---|
| Size | 276.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c167f9f30d9ce0e711d090a2e71083fce0484295005b5a325e0de6e59fd11f31
|
|
BLAKE2b-256 checksum How to use checksums |
316d4a1d0624433eb9e0ed53e08fd106ad057144591a30f9e943e436a224a339
|
| 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 22, 2026.
Transparency logRelease files / ziwei-0.1.0-py3-none-any.whl
| Download URL | ziwei-0.1.0-py3-none-any.whl |
|---|---|
| Size | 74.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
a720f4d40497119673b35acbc2be2dd87dc9aa6c3f813c6e4c0ba715d1e4c862
|
|
BLAKE2b-256 checksum How to use checksums |
e09d237750d61394596e72a0632681bd7229eac02c2f13ab1328ecc9079da33a
|
| 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 22, 2026.
Transparency logSecurity for ziwei 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
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ziwei-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 22, 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.