### Install Kintaiyi from Source Source: https://github.com/kentang2017/kintaiyi/wiki/Installation Install the latest development version of Kintaiyi from its GitHub repository and set it up for development. ```bash git clone https://github.com/kentang2017/kintaiyi.git cd kintaiyi pip install -e ".[cli,app,dev]" ``` -------------------------------- ### Install Kintaiyi Core Library Source: https://github.com/kentang2017/kintaiyi/wiki/Installation Install the main Kintaiyi library and its core dependencies from PyPI. ```bash pip install kintaiyi ``` -------------------------------- ### Install and Launch Streamlit App Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Install the Kintaiyi application dependencies and launch the Streamlit web interface. ```bash pip install kintaiyi[app] streamlit run app.py ``` -------------------------------- ### Install Kintaiyi with CLI support Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Install the Kintaiyi package with the necessary dependencies for the command-line interface. ```bash pip install kintaiyi[cli] ``` -------------------------------- ### Install Kintaiyi with Web Extras Source: https://github.com/kentang2017/kintaiyi/blob/master/README.md Installs Kintaiyi with optional dependencies for the Flask web backend. ```bash pip install kintaiyi[web] ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/kentang2017/kintaiyi/blob/master/CONTRIBUTING.md Clone the Kintaiyi repository and install it in editable mode with development dependencies. ```bash git clone https://github.com/kentang2017/kintaiyi.git cd kintaiyi pip install -e ".[dev]" ``` -------------------------------- ### Install Kintaiyi with App Support Source: https://github.com/kentang2017/kintaiyi/wiki/Web-Interface Install the kintaiyi package including the necessary dependencies for the web application. This command is used to set up the project locally. ```bash pip install kintaiyi[app] ``` -------------------------------- ### Verify Kintaiyi Installation (CLI Check) Source: https://github.com/kentang2017/kintaiyi/wiki/Installation Verify the Kintaiyi installation by checking its version using the command-line interface, if the CLI extra was installed. ```bash kintaiyi version ``` -------------------------------- ### Install Kintaiyi with Dev Extras Source: https://github.com/kentang2017/kintaiyi/blob/master/README.md Installs Kintaiyi with optional dependencies for development, including testing and linting tools. ```bash pip install kintaiyi[dev] ``` -------------------------------- ### Complete Taiyi API Example Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API A comprehensive example demonstrating instantiation, board calculation with the `pan` method, and printing the results in a formatted JSON structure. It also shows how to access specific fields from the result. ```python import json from kintaiyi.kintaiyi import Taiyi # Create Taiyi object taiyi = Taiyi(year=1552, month=9, day=24, hour=0, minute=0) # Calculate yearly board with Gold Mirror method result = taiyi.pan(ji_style=0, method=1) # Print formatted JSON print(json.dumps(result, ensure_ascii=False, indent=2)) # Access specific fields print(f"計法: {result['太乙計']}") print(f"公式: {result['太乙公式類別']}") print(f"年號: {result['年號']}") print(f"局式: {result['局式']}") print(f"值日宿: {result['二十八宿值日']}") print(f"主客: {result['推主客相闗法']}") ``` -------------------------------- ### Install Development Dependencies Source: https://github.com/kentang2017/kintaiyi/wiki/Contributing Install the package in editable mode along with development tools like pytest and ruff. ```bash pip install -e ".[dev]" ``` -------------------------------- ### Verify Kintaiyi Installation (Version Check) Source: https://github.com/kentang2017/kintaiyi/wiki/Installation Check if Kintaiyi is installed correctly by importing it and printing its version number using Python. ```bash python -c "import kintaiyi; print(kintaiyi.__version__)" ``` -------------------------------- ### Install Kintaiyi with Optional Extras Source: https://github.com/kentang2017/kintaiyi/wiki/Installation Install Kintaiyi with specific optional extras for different functionalities like CLI, web interfaces, or development tools. ```bash # CLI command-line tool (powered by Typer) pip install kintaiyi[cli] # Streamlit graphical web interface pip install kintaiyi[app] # Flask web backend pip install kintaiyi[web] # Development tools (pytest + ruff) pip install kintaiyi[dev] # Install everything pip install kintaiyi[cli,app] ``` -------------------------------- ### Example CLI Text Output Source: https://github.com/kentang2017/kintaiyi/wiki/Output-Fields Default text output from the CLI showing key divination fields. ```text 太乙計: 年計 太乙公式類別: 太乙金鏡 公元日期: 2026年3月24日12時 ... ``` -------------------------------- ### Example CLI Markdown Output Source: https://github.com/kentang2017/kintaiyi/wiki/Output-Fields Markdown formatted output from the CLI, useful for documentation or simple display. ```markdown | 項目 | 內容 | | --- | --- | | 太乙計 | 年計 | | 太乙公式類別 | 太乙金鏡 | ``` -------------------------------- ### Example CLI JSON Output Source: https://github.com/kentang2017/kintaiyi/wiki/Output-Fields JSON formatted output from the CLI, suitable for programmatic parsing. ```json { "太乙計": "年計", "太乙公式類別": "太乙金鏡", "公元日期": "2026年3月24日12時" } ``` -------------------------------- ### Basic Year Calculation Example Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Performs a year calculation using specific date, time, mode, and method parameters. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode year --method 1 ``` -------------------------------- ### Run Kintaiyi Tests Source: https://github.com/kentang2017/kintaiyi/wiki/FAQ To run the project's tests, first install the development dependencies including the test suite, then execute pytest. ```bash pip install -e ".[dev]" pytest ``` -------------------------------- ### Display Kintaiyi version Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Shows the currently installed version of the Kintaiyi package. The output includes the package name and version number. ```bash kintaiyi version # Output: kintaiyi 0.2.3 ``` -------------------------------- ### CLI: Calculate Life Destiny Source: https://github.com/kentang2017/kintaiyi/blob/master/README.md Command-line interface example for calculating personal destiny. Requires date, time, mode, and sex. ```bash kintaiyi calculate --date 1990-05-15 --time 08:00 --mode life --sex male ``` -------------------------------- ### Query Dates Before Common Era (BCE) Source: https://github.com/kentang2017/kintaiyi/wiki/FAQ The Python API supports querying dates before the Common Era by using negative integers for years. This example demonstrates querying a date in 578 BCE. ```python result = Taiyi(-578, 6, 15, 12, 0).pan(ji_style=0, method=1) ``` -------------------------------- ### Calculate Taiyi Gold Mirror via CLI (Method 1) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Command-line interface command to calculate Taiyi using the Gold Mirror method. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --method 1 ``` -------------------------------- ### Minute Calculation using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute minute calculation from the command line. Use --mode minute. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode minute ``` -------------------------------- ### Day Calculation using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute day calculation from the command line. Use --mode day. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode day ``` -------------------------------- ### Python: Basic Board Calculation Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Create a Taiyi object and calculate a yearly board using the Gold Mirror method. Access key results like year calculation, board formation, and daily stars. ```python from kintaiyi.kintaiyi import Taiyi # Create a Taiyi object with date and time taiyi = Taiyi(year=2026, month=3, day=24, hour=12, minute=30) # Calculate a yearly board using Gold Mirror method result = taiyi.pan(ji_style=0, method=1) # Access key results print(result["太乙計"]) print(result["局式"]) print(result["二十八宿值日"]) print(result["推主客相闗法"]) ``` -------------------------------- ### Clone Kintaiyi Repository Source: https://github.com/kentang2017/kintaiyi/wiki/Contributing Clone the Kintaiyi repository to your local machine and navigate into the project directory. ```bash git clone https://github.com/kentang2017/kintaiyi.git cd kintaiyi ``` -------------------------------- ### Piping JSON Output to jq for Pretty-Printing Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Demonstrates how to pipe the JSON output of a calculation to the `jq` tool for pretty-printing. ```bash # Pretty-print with jq kintaiyi calculate --date 2026-03-24 --time 12:30 --output json | jq . ``` -------------------------------- ### Launch Kintaiyi Web App Source: https://github.com/kentang2017/kintaiyi/wiki/Web-Interface Run the Streamlit application locally to access the Kintaiyi web interface. The app will be available at http://localhost:8501. ```bash streamlit run app.py ``` -------------------------------- ### Month Calculation using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute month calculation from the command line. Use --mode month. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode month ``` -------------------------------- ### Calculate Taiyi Gold Panning Song via CLI (Method 2) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Command-line interface command to calculate Taiyi using the Gold Panning Song method. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --method 2 ``` -------------------------------- ### Format Code with Ruff Source: https://github.com/kentang2017/kintaiyi/blob/master/CONTRIBUTING.md Format the code according to project standards using Ruff. ```bash ruff format src/ tests/ ``` -------------------------------- ### CLI: Day Calculation with JSON Output Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Perform a day calculation using the Kintaiyi CLI and output the results in JSON format. ```bash # Day calculation with JSON output kintaiyi calculate --date 2026-03-24 --time 12:30 --mode day --output json ``` -------------------------------- ### Year Calculation using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute year calculation from the command line. Use --mode year. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode year ``` -------------------------------- ### Iterate Over Calculation Modes Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Demonstrates iterating through all five calculation modes (Year, Month, Day, Hour, Minute) for the `pan` method with a fixed ancient formula (Gold Mirror). Prints the '局式' for each mode. ```python from kintaiyi.kintaiyi import Taiyi taiyi = Taiyi(2026, 3, 24, 12, 30) # All five calculation modes with Gold Mirror method modes = {0: "Year", 1: "Month", 2: "Day", 3: "Hour", 4: "Minute"} for ji_style, name in modes.items(): result = taiyi.pan(ji_style=ji_style, method=1) print(f"{name}: 局式={result['局式']}") ``` -------------------------------- ### Calculate Taiyi Orthodox via CLI (Method 0) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Command-line interface command to calculate Taiyi using the Orthodox method. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --method 0 ``` -------------------------------- ### Calculate Taiyi Bureau via CLI (Method 3) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Command-line interface command to calculate Taiyi using the Taiyi Bureau method. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --method 3 ``` -------------------------------- ### Commit and Push Changes Source: https://github.com/kentang2017/kintaiyi/wiki/Contributing Commit your changes with a descriptive message and push them to your fork. ```bash git commit -m "Add my feature" git push origin feature/my-feature ``` -------------------------------- ### Python: Export Calculation as JSON Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Calculate a board and export the results as a JSON string with indentation and without ASCII encoding. ```python import json from kintaiyi.kintaiyi import Taiyi result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=1) print(json.dumps(result, ensure_ascii=False, indent=2)) ``` -------------------------------- ### CLI: Hour Calculation with Markdown Output Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Perform an hour calculation using the Kintaiyi CLI and output the results in a Markdown table format. ```bash # Markdown table output kintaiyi calculate --date 2026-03-24 --time 12:30 --mode hour --output markdown ``` -------------------------------- ### Run Tests with Pytest Source: https://github.com/kentang2017/kintaiyi/blob/master/CONTRIBUTING.md Execute the test suite using the pytest framework. ```bash pytest ``` -------------------------------- ### Day Calculation using Python API Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Use the day mode for daily planning and choosing auspicious days. Specify ji_style=2. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=2, method=1) ``` -------------------------------- ### Saving JSON Output to a File Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Shows how to redirect the JSON output of a calculation to a file named `result.json`. ```bash # Save to file kintaiyi calculate --date 2026-03-24 --time 12:30 --output json > result.json ``` -------------------------------- ### Import Taiyi Class Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Import the core Taiyi class from the kintaiyi library. ```python from kintaiyi.kintaiyi import Taiyi ``` -------------------------------- ### Day Calculation with JSON Output Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Executes a day calculation and specifies JSON as the output format. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode day --output json ``` -------------------------------- ### CLI: Year Calculation Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Perform a year calculation using the Kintaiyi CLI with specified date, time, mode, and method. ```bash # Year calculation with Gold Mirror method kintaiyi calculate --date 2026-03-24 --time 12:30 --mode year --method 1 ``` -------------------------------- ### Create a Feature Branch Source: https://github.com/kentang2017/kintaiyi/wiki/Contributing Before making changes, create a new branch for your feature. ```bash git checkout -b feature/my-feature ``` -------------------------------- ### Hour Calculation using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute hour calculation from the command line. Use --mode hour. This is the default mode in the Streamlit web interface. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode hour ``` -------------------------------- ### Instantiate Taiyi Class Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Create an instance of the Taiyi class with year, month, day, hour, and minute. Supports negative years for BCE dates. ```python taiyi = Taiyi(year=2026, month=3, day=24, hour=12, minute=30) ``` -------------------------------- ### Format Kintaiyi Code Source: https://github.com/kentang2017/kintaiyi/wiki/FAQ Use Ruff to check and automatically fix code formatting issues in the source directory. ```bash ruff check src/ --fix ruff format src/ ``` -------------------------------- ### Lint Code with Ruff Source: https://github.com/kentang2017/kintaiyi/blob/master/CONTRIBUTING.md Check the code for linting issues using Ruff. ```bash ruff check src/ tests/ ``` -------------------------------- ### Calculate Taiyi Board (pan method) Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Calculate a Taiyi divination board using the `pan` method. Specify `ji_style` for calculation mode and `method` for the ancient formula. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=1) ``` -------------------------------- ### Calculate Taiyi Board (kook method) Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Calculate a Taiyi divination board using the `kook` method, which is an alias for `pan`. Specify `ji_style` and `method`. ```python result = Taiyi(1552, 9, 24, 0, 0).kook(ji_style=0, method=1) ``` -------------------------------- ### Taiyi Class Constructor Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Initializes the Taiyi class with specific date and time parameters. Supports negative years for BCE dates. ```APIDOC ## Taiyi Constructor ### Description Initializes the Taiyi class with specific date and time parameters. ### Signature Taiyi(year, month, day, hour, minute) ### Parameters #### Path Parameters - **year** (int) - Required - Year in Common Era (supports negative years for BCE) - **month** (int) - Required - Month (1–12) - **day** (int) - Required - Day (1–31) - **hour** (int) - Required - Hour (0–23) - **minute** (int) - Required - Minute (0–59) ### Example ```python taiyi = Taiyi(year=2026, month=3, day=24, hour=12, minute=30) ``` ``` -------------------------------- ### kook() Method Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Alias for the pan() method, functioning identically for calculating Taiyi divination boards. ```APIDOC ## kook(ji_style, method) ### Description Alias for `pan()`. Functions identically. ### Method kook ### Parameters #### Path Parameters - **ji_style** (int) - Required - Calculation mode: `0`=Year, `1`=Month, `2`=Day, `3`=Hour, `4`=Minute - **method** (int) - Required - Ancient formula: `0`=統宗, `1`=金鏡, `2`=淘金歌, `3`=太乙局 ### Returns `dict` - A dictionary containing all board calculation results. ### Example ```python result = Taiyi(1552, 9, 24, 0, 0).kook(ji_style=0, method=1) ``` ``` -------------------------------- ### Code Formatting and Linting with Ruff Source: https://github.com/kentang2017/kintaiyi/wiki/Contributing Utilize ruff for checking code for issues and auto-fixing them, as well as for formatting the code. ```bash # Check for issues ruff check src/ ``` ```bash # Auto-fix issues ruff check src/ --fix ``` ```bash # Format code ruff format src/ ``` -------------------------------- ### Minute Calculation using Python API Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Use the minute mode for the finest temporal resolution, precise to the minute. Specify ji_style=4. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=4, method=1) ``` -------------------------------- ### Month Calculation using Python API Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Use the month mode for monthly fortune and auspiciousness. Specify ji_style=1. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=1, method=1) ``` -------------------------------- ### Calculate Yearly Taiyi Board Source: https://github.com/kentang2017/kintaiyi/blob/master/README.md Calculates a yearly Taiyi board using the Taiyi class. Prints the yearly calculation result and board details. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=1) print(result["太乙計"]) print(result["局式"]) print(result["二十八宿值日"]) print(result["推主客相闗法"]) ``` -------------------------------- ### pan() Method Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Calculates a Taiyi divination board using specified calculation modes and ancient formulas. ```APIDOC ## pan(ji_style, method) ### Description Calculate a Taiyi divination board. ### Method pan ### Parameters #### Path Parameters - **ji_style** (int) - Required - Calculation mode: `0`=Year, `1`=Month, `2`=Day, `3`=Hour, `4`=Minute - **method** (int) - Required - Ancient formula: `0`=統宗, `1`=金鏡, `2`=淘金歌, `3`=太乙局 ### Returns `dict` - A dictionary containing all board calculation results. ### Example ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=1) ``` ``` -------------------------------- ### Hour Calculation with Markdown Output Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Performs an hour calculation and sets the output format to Markdown table. ```bash kintaiyi calculate --date 2026-03-24 --time 12:30 --mode hour --output markdown ``` -------------------------------- ### Life Divination using CLI Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Execute life divination from the command line. Requires --mode life and --sex parameter. Use English words for sex. ```bash # CLI uses English words for sex kintaiyi calculate --date 1990-05-15 --time 08:00 --mode life --sex male ``` -------------------------------- ### Calculate Taiyi Gold Panning Song (Method 2) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Calculates Taiyi using the Gold Panning Song method. This method is based on the Song Dynasty text 《太乙淘金歌》. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=2) ``` -------------------------------- ### Compare Results Across All Taiyi Methods Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Iterates through all four Taiyi calculation methods (0-3) for a given date and time, printing the resulting board number (局式) for each. Requires importing the Taiyi class. ```python from kintaiyi.kintaiyi import Taiyi taiyi = Taiyi(2026, 3, 24, 12, 30) methods = { 0: "太乙統宗 (Orthodox)", 1: "太乙金鏡 (Gold Mirror)", 2: "太乙淘金歌 (Gold Panning Song)", 3: "太乙局 (Taiyi Bureau)", } for method_id, name in methods.items(): result = taiyi.pan(ji_style=0, method=method_id) print(f"{name}: 局式={result['局式']}") ``` -------------------------------- ### Calculate Taiyi Orthodox (Method 0) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Calculates Taiyi using the Orthodox method. This method is based on the Yuan Dynasty text 《太乙統宗寶鑑》. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=0) ``` -------------------------------- ### Auto-fix Lint Issues with Ruff Source: https://github.com/kentang2017/kintaiyi/blob/master/CONTRIBUTING.md Automatically fix linting issues in the code using Ruff. ```bash ruff check src/ tests/ --fix ``` -------------------------------- ### Default Calculation Using Current Time Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Executes a calculation using the current date and time as defaults. No specific date or time parameters are provided. ```bash # Uses current date and time kintaiyi calculate ``` -------------------------------- ### Calculate Taiyi Bureau (Method 3) Source: https://github.com/kentang2017/kintaiyi/wiki/Ancient-Methods Calculates Taiyi using the Taiyi Bureau method. This method is based on the text 《太乙局》. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=0, method=3) ``` -------------------------------- ### CLI: Life Divination Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Perform life divination using the Kintaiyi CLI, specifying date, time, mode, and sex. ```bash # Life divination kintaiyi calculate --date 1990-05-15 --time 08:00 --mode life --sex male ``` -------------------------------- ### Year Calculation with Individual Date Components Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Calculates a year divination using individual year, month, day, hour, and minute components, along with mode and method. ```bash kintaiyi calculate --year 1552 --month 9 --day 24 --hour 0 --minute 0 --mode year --method 1 ``` -------------------------------- ### Hour Calculation using Python API Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Use the hour mode for precise timing within a day, using traditional two-hour periods. Specify ji_style=3. ```python result = Taiyi(2026, 3, 24, 12, 30).pan(ji_style=3, method=1) ``` -------------------------------- ### Life Divination with English Sex Input Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Conducts a life divination calculation using English for the sex parameter. ```bash # Using English kintaiyi calculate --date 1990-05-15 --time 08:00 --mode life --sex male ``` -------------------------------- ### Life Divination with Chinese Sex Input Source: https://github.com/kentang2017/kintaiyi/wiki/CLI-Reference Performs a life divination calculation, specifying the sex parameter using Chinese characters. ```bash # Using Chinese kintaiyi calculate --date 1990-05-15 --time 08:00 --mode life --sex 男 ``` -------------------------------- ### taiyi_life() Method Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Calculates life divination using the modified Taiyi method, based on the provided sex. ```APIDOC ## taiyi_life(sex) ### Description Calculate life divination using the modified Taiyi method. ### Method taiyi_life ### Parameters #### Path Parameters - **sex** (str) - Required - `"男"` for male, `"女"` for female ### Returns `dict` - Life divination results. ### Example ```python life = Taiyi(1990, 5, 15, 8, 0).taiyi_life(sex="男") ``` ``` -------------------------------- ### Python: Life Divination Source: https://github.com/kentang2017/kintaiyi/wiki/Quick-Start Perform life divination using the Taiyi object by specifying the date, time, and sex. The result provides life divination details. ```python from kintaiyi.kintaiyi import Taiyi taiyi = Taiyi(year=1990, month=5, day=15, hour=8, minute=0) # Life divination (sex: "男" for male, "女" for female) life_result = taiyi.taiyi_life(sex="男") print(life_result) ``` -------------------------------- ### Life Divination using Python API Source: https://github.com/kentang2017/kintaiyi/wiki/Calculation-Modes Use the life mode for personal destiny calculation. Requires birth date, time, and sex. Use Chinese characters for sex. ```python # Note: Python API uses Chinese characters for sex life = Taiyi(1990, 5, 15, 8, 0).taiyi_life(sex="男") # "男" or "女" ``` -------------------------------- ### Calculate Life Divination Source: https://github.com/kentang2017/kintaiyi/wiki/Python-API Perform life divination using the `taiyi_life` method. Requires specifying the sex as '男' for male or '女' for female. ```python life = Taiyi(1990, 5, 15, 8, 0).taiyi_life(sex="男") ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.