内容列表
简介
Chinese permanent calendar
这是一个通过python查询中国万年历相关信息的的包,可以根据阳历日期或阴历日期查询,查询范围从1970-01-01到2099-12-31,返回结果包括:
- 公历信息:节日、星座
- 农历信息:宜、忌、冲、煞、神位、胎神、周易、五行、天干地支、彭祖百忌、董公择日法
使用说明
示例
import chinese_permanent_calendar as calendar
import datetime
# 根据阳历日期得到阴历日期的详情
date = datetime.date(2020, 1, 1)
luner_date = calendar.get_lunar_by_gregorian(date)
print("阳历:", luner_date.name, "阴历:", luner_date['LunarDate'])
# 根据阴历得到阳历日期及当天的详情
gregorian_date = calendar.get_gregorian_by_lunar(luner_date['LunarDate'])
# 得到所有节日包含国庆节的日期
date = calendar.get_days_by_festival(['国庆节'])
# 得到所有的日期数据
all_data = calendar.get_all_data(start=datetime.date(2020, 1, 1), end=datetime.date(2020, 2, 1))
属性说明
| 属性 | 含义 |
|---|---|
| GregorianDateTime | 阳历日期 |
| LunarDateTime | 阴历日期 |
| LJie | 阴历节日 |
| GJie | 阳历节日 |
| Yi | 宜 |
| Ji | 忌 |
| ShenWei | 神位 |
| Taishen | 胎神 |
| Chong | 冲 |
| SuiSha | 岁煞 |
| WuxingJiazi | 五行甲子年 |
| WuxingNaYear | 五行纳音-年 |
| WuxingNaMonth | 五行纳音--月 |
| WuxingNaDay | 五行纳音-日 |
| MoonName | 月相 |
| XingEast | 东方星座-28星宿 |
| XingWest | 西方星座-12星座 |
| PengZu | 彭祖百忌 |
| JianShen | 十二建星 |
| TianGanDiZhiYear | 天干地支-奶牛 |
| TianGanDiZhiMonth | 天干地支-月 |
| TianGanDiZhiDay | 天干地支-日 |
| LMonthName | 农历-月份别名 |
| LYear | 阴历-年 |
| LMonth | 阴历-月 |
| LDay | 阴历-日 |
| SolarTermName | 节气 |
| GYear | 阳历-年 |
| GMonth | 阳历-月 |
| GDay | 阳历-日 |
| is_weekend | 是否为周末 |
| is_weekday | 是否为工作日 |
其他说明
- 原始数据文件拿去:cp_calendar.csv.gz
- 有任何BUG、改进请提交issue或联系:18813052953@163.com
- 本人学生一枚,闲人一个,希望与更多共同学习、共同进步的小伙伴们多多交流学习。
Metadata
Release files for chinese-permanent-calendar 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 |
|---|---|---|---|---|
| chinese_permanent_calendar-0.1.0.tar.gz | 2.2 MB | Without provenance | Details for chinese_permanent_calendar-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| chinese_permanent_calendar-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for chinese_permanent_calendar-0.1.0-py3-none-any.whl |
Total release size: 4.3 MB
Release files / chinese_permanent_calendar-0.1.0.tar.gz
| Download URL | chinese_permanent_calendar-0.1.0.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f2ce12dac602df61de4a264b7d9aef2327bd82c33ca6d9e247e7239946bd7ec
|
|
BLAKE2b-256 checksum How to use checksums |
9bf4bf075eac1b16512e8bb563eab7f29e22e4f43a2d73419a5661930781ef2c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Release files / chinese_permanent_calendar-0.1.0-py3-none-any.whl
| Download URL | chinese_permanent_calendar-0.1.0-py3-none-any.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9e566a456441835933f28d1118189c9f1a0797e6b31beb511159924991239ba7
|
|
BLAKE2b-256 checksum How to use checksums |
67fe33a767106e34283b599ca98589d56c9de15bd50caa7531e8faf5069f5c6f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.4.2 importlib_metadata/3.10.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.8
|
Security for chinese-permanent-calendar 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.
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.