市面上有哪些流行的命理八字小程序
- 作者: 彩涵
- 来源: 投稿
- 2024-10-07
一、市面上有哪些流行的命理八字小程序
免费命理八字小程序八字排盘*
八字算命*
八字合婚*
八字起名*
八字流年运势
付费命理八字小程序
紫微斗数*
四柱八字*
六爻占卜*
奇门遁甲*
太乙神数*
其他热门命理八字小程序
八字命盘八字合婚
八字起名
八字流年运势
八字五行查询
八字神煞查询
八字大运查询
八字喜用神查询
二、八字算命小程序源代码
```pythonimport datetime
import math
生肖列表zodiac_list = ['鼠', '牛', '虎', '兔', '龙', '蛇', '马', '羊', '猴', '鸡', '狗', '猪']
天干列表heavenly_stems_list = ['甲', '乙', '丙', '丁', '戊', '己', '庚', '辛', '壬', '癸']
地支列表earthly_branches_list = ['子', '丑', '寅', '卯', '辰', '巳', '午', '未', '申', '酉', '戌', '亥']
五行列表five_elements_list = ['金', '木', '水', '火', '土']
十神列表ten_gods_list = ['比肩', '劫财', '食神', '伤官', '偏财', '正财', '七杀', '正官', '偏印', '正印']
八字算命类class Bazi:
def __init__(self, birth_year, birth_month, birth_day, birth_ho*):
self.birth_year = birth_year
self.birth_month = birth_month
self.birth_day = birth_day
self.birth_ho* = birth_ho*
计算生肖
self.zodiac = zodiac_list[(self.birth_year 4) % 12]
计算天干
self.heavenly_stem = heavenly_stems_list[(self.birth_year 4) % 10]
计算地支
self.earthly_branch = earthly_branches_list[(self.birth_year 4) % 12]
计算五行
self.five_elements = five_elements_list[(self.birth_year 4) % 5]
计算十神
self.ten_gods = ten_gods_list[(self.birth_year 4) % 10]
获取八字信息
def get_bazi(self):
ret*n f'{self.zodiac}年{self.heavenly_stem}月{self.earthly_branch}日{self.birth_ho*}时'
获取大运信息
def get_dayun(self):
dayun_list = []
for i in range(10):
start_year = self.birth_year + i 10
end_year = start_year + 9
dayun_list.append(f'{start_year}{end_year}年')
ret*n dayun_list
获取流年信息
def get_liunian(self):
liunian_list = []
for i in range(12):
liunian_list.append(f'{self.birth_year + i}年')
ret*nliunian_list
获取五行旺衰
def get_wuxing_wangshuai(self):
wuxing_wangshuai = {}
for element in five_elements_list:
wuxing_wangshuai[element] = 0
for stem in heavenly_stems_list:
if stem in ['甲', '乙']:
wuxing_wangshuai['木'] += 1
elif stem in ['丙', '丁']:
wuxing_wangshuai['火'] += 1
elif stem in ['戊', '己']:
wuxing_wangshuai['土'] += 1
elif stem in ['庚', '辛']:
wuxing_wangshuai['金'] += 1
elif stem in ['壬', '癸']:
wuxing_wangshuai['水'] += 1
for branch in earthly_branches_list:
if branch in ['寅', '卯']:
wuxing_wangshuai['木'] += 1
elif branch in ['巳', '午']:
wuxing_wangshuai['火'] += 1
elif branch in ['辰', '戌', '丑', '未']:
wuxing_wangshuai['土'] += 1
elif branch in ['申', '酉']:
wuxing_wangshuai['金'] += 1
elif branch in ['亥', '子']:
wuxing_wangshuai['水'] += 1
ret*n wuxing_wangshuai
获取十神旺衰
def get_shishen_wangshuai(self):
shishen_wangshuai = {}
for god in ten_gods_list:
shishen_wangshuai[god] = 0
for stem in heavenly_stems_list:
if stem in ['甲', '乙']:
shishen_wangshuai['比肩'] += 1
shishen_wangshuai['劫财'] += 1
elif stem in ['丙', '丁']:
shishen_wangshuai['食神'] += 1
shishen_wangshuai['伤官'] += 1
elif stem in ['戊', '己']:
shishen_wangshuai['偏财'] += 1
shishen_wangshuai['正财'] += 1
elif stem in ['庚', '辛']:
shishen_wangshuai['七杀'] += 1
shishen_wangshuai['正官'] += 1
elif stem in ['壬', '癸']:
shishen_wangshuai['偏印'] += 1
shishen_wangshuai['正印'] += 1
for branch in earthly_branches_list:
if branch in ['寅', '卯']:
shishen_wangshuai['比肩'] += 1
shishen_wangshuai['劫财'] += 1
elif branch in ['巳', '午']:
shishen_wangshuai['食神'] += 1
shishen_wangshuai['伤官'] += 1
elif branch in ['辰', '戌', '丑', '未']:
shishen_wangshuai['偏财'] += 1
shishen_wangshuai['正财'] += 1
elif branch in ['申', '酉']:
shishen_wangshuai['七杀'] += 1
shishen_wangshuai['正官'] += 1
elif branch in ['亥', '子']:
shishen_wangshuai['偏印'] += 1
shishen_wangshuai['正印'] += 1
ret*n shishen_wangshuai
获取八字算命结果def get_bazi_result(birth_year, birth_month, birth_day, birth_ho*):
bazi = Bazi(birth_year, birth_month, birth_day, birth_ho*)
result = {}
result['八字'] = bazi.get_bazi()
result['大运'] = bazi.get_dayun()
result['流年'] = bazi.get_liunian()
result['五行旺衰'] = bazi.get_wuxing_wangshuai()
result['十神旺衰'] = bazi.get_shishen_wangshuai()
ret*n result
测试if __name__ == '__main__':
birth_year = int(input('请输入出生年份:'))
birth_month = int(input('请输入出生月份:'))
birth_day = int(input('请输入出生日期:'))
birth_ho* = int(input('请输入出生时辰:'))
result = get_bazi_result(birth_year, birth_month, birth_day, birth_ho*)
print(result)
```三、命理八字免费算命软件
免费八字算命软件八字排盘算命
[八字排盘](https://*xm120*/paipan/)
[八字排盘算命](https://*360kan*/paipan/)
[八字排盘免费算命](https://*zhouyi.cc/paipan/)
八字合婚算命[八字合婚](https://*xm120*/hehun/)
[八字合婚算命](https://*360kan*/hehun/)
[八字合婚免费算命](https://*zhouyi.cc/hehun/)
八字起名算命[八字起名](https://*xm120*/qiming/)
[八字起名算命](https://*360kan*/qiming/)
[八字起名免费算命](https://*zhouyi.cc/qiming/)
八字流年运势算命[八字流年运势](https://*xm120*/liuyun/)
[八字流年运势算命](https://*360kan*/liuyun/)
[八字流年运势免费算命](https://*zhouyi.cc/liuyun/)
八字命理分析算命[八字命理分析](https://*xm120*/mingli/)
[八字命理分析算命](https://*360kan*/mingli/)
[八字命理分析免费算命](https://*zhouyi.cc/mingli/)
注意事项:这些软件仅供参考,不能完全依赖。
算命结果仅代表一种可能性,不应过于执着。
命运掌握在自己手中,努力和行动才是zui重要的。
四、八字命理软件有哪些
免费软件:八字排盘网:https://*bazip*/
紫微排盘网:https://*ziweipai*/
八字命理网:https://*bazimi*/
八字算命网:https://*bazisu*/
八字合婚网:https://*bazihehun*/
付费软件:八字排盘*:https://*bazip*/
紫微斗数*:https://*ziweidoushu*/
八字命理*:https://*bazimi*/
八字算命*:https://*bazisu*/
八字合婚*:https://*bazihehun*/
其他在线工具:八字排盘:https://*timeanddate*/horoscope/
紫微斗数排盘:https://*astro*/cgi/chart.cgi?btyp=w24
八字合婚:https://*chinesefortunecalendar*/compatibility/
八字算命:https://*chinesefortunecalendar*/horoscope/