No project description provided
Project description
I-Ching Python
Description
I-Ching objects construction using Python type hints.
Pattern-based implementation without hard-coded mappings. Define how philosophical concepts in pure Python.
Features
- generating hexagrams using multiple methods,
- interpreting their meanings (TODO)
- performing divination based on the I-Ching (TODO)
- arithmetic operations on Heavenly Stems and Earthly Branches (干支)
A few implementations are in Chinese, as the author is not satisfied with their current translation. In the future, both Chinese and English will be supported.
Installation
pip install ichingpy
A Simple Example
import ichingpy as icp
```python
hexagram = icp.Hexagram.from_yarrow_stalks()
-- --
-- --
-- --
-----
-- -- X -> -----
----- O -> -- --
Arithmetic operations on Heavenly Stems and Earthly Branches (干支)
>>> icp.HeavenlyStem.Jia + 1
<HeavenlyStem.Yi: 2>
>>> gui = icp.HeavenlyStem.Gui
>>> jia = icp.HeavenlyStem.Jia
>>> jia + gui
<HeavenlyStem.Jia: 1>
>>> jia = icp.HeavenlyStem.Jia
>>> zi = icp.EarthlyBranch.Zi
>>> jia_zi = icp.SexagenaryCycle(jia, zi)
>>> jia_zi
甲子
>>> jia_zi+1
乙丑
>>> jia_zi+60
甲子
Assign Stem and Branch to a hexagram (装卦、纳甲)
>>> gou = icp.Hexagram.from_binary([2, 1, 1, 1, 1, 1])
>>> gou
-----
-----
-----
-----
-----
-- --
>>> assigner = icp.StemBranchAssigner()
>>> assigner.assign(gou)
>>> gou
壬 戌土 -----
壬 申金 -----
壬 午火 -----
辛 酉金 -----
辛 亥水 -----
辛 丑土 -- --
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ichingpy-0.1.3.tar.gz.
File metadata
- Download URL: ichingpy-0.1.3.tar.gz
- Upload date:
- Size: 11.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cad0700c23f79bae210cb1ef929da97238cd55e8a660f1ca2e88a77d1350255f
|
|
| MD5 |
d2b53d8fdcd1931e54a68992692ec1f8
|
|
| BLAKE2b-256 |
57420f877d572d690a2ddbc54ebce9c79eeddcdd93effc7ca77d1158107a39e8
|
Provenance
The following attestation bundles were made for ichingpy-0.1.3.tar.gz:
Publisher:
python-publish.yml on JinyangWang27/ichingpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ichingpy-0.1.3.tar.gz -
Subject digest:
cad0700c23f79bae210cb1ef929da97238cd55e8a660f1ca2e88a77d1350255f - Sigstore transparency entry: 159551466
- Sigstore integration time:
-
Permalink:
JinyangWang27/ichingpy@203a5a171d0f2a8a9b5a9a5691a56b61a8edb044 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JinyangWang27
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@203a5a171d0f2a8a9b5a9a5691a56b61a8edb044 -
Trigger Event:
push
-
Statement type:
File details
Details for the file ichingpy-0.1.3-py3-none-any.whl.
File metadata
- Download URL: ichingpy-0.1.3-py3-none-any.whl
- Upload date:
- Size: 13.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
496a7b76948f68759e20ca183831c3d8505939c3577a25ed79fc6a9936a920e6
|
|
| MD5 |
c2766828654d92ff0b38b2dd6dcea01c
|
|
| BLAKE2b-256 |
676fdf1bfeed7ed439fc5c883e8a55b0e6ff736b5a2265ed46f85380c2b7d166
|
Provenance
The following attestation bundles were made for ichingpy-0.1.3-py3-none-any.whl:
Publisher:
python-publish.yml on JinyangWang27/ichingpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
ichingpy-0.1.3-py3-none-any.whl -
Subject digest:
496a7b76948f68759e20ca183831c3d8505939c3577a25ed79fc6a9936a920e6 - Sigstore transparency entry: 159551467
- Sigstore integration time:
-
Permalink:
JinyangWang27/ichingpy@203a5a171d0f2a8a9b5a9a5691a56b61a8edb044 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/JinyangWang27
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@203a5a171d0f2a8a9b5a9a5691a56b61a8edb044 -
Trigger Event:
push
-
Statement type: