台灣勞健保勞退法定費用計算引擎 — Taiwan statutory payroll calculation engine
Project description
taiwan-payroll (Python)
台灣勞健保勞退法定費用計算引擎的 Python 實作。讀同一份 data/,跑通同一套 testdata/ 黃金向量,與 TypeScript 版計算結果完全一致。零執行期依賴(純 stdlib)。
安裝
pip install taiwan-payroll
用法
from taiwan_payroll import create_payroll_engine, CalculateInput, SupplementaryInput, ProratedInput
engine = create_payroll_engine(year=2026)
engine.calculate(CalculateInput(monthly_salary=42000, dependents=1, pension_self_contribution=0.06))
engine.calculate_supplementary(SupplementaryInput(type="bonus", amount=200000, monthly_insured_salary=42000))
engine.calculate_prorated(ProratedInput(monthly_salary=29500, start_date="2026-03-08"))
開發
cd packages/python && python3 -m venv .venv && .venv/bin/python -m pip install -e ".[test]"
.venv/bin/python -m pytest
跨語言一致性:tests/test_vectors.py 載入 repo 根 testdata/ 的同一套黃金向量,與 TypeScript 引擎逐位元比對。
免責聲明
計算結果僅供參考,實際應繳金額以勞保局、健保署核發之繳款單為準。
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
taiwan_payroll-1.0.0.tar.gz
(14.5 kB
view details)
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 taiwan_payroll-1.0.0.tar.gz.
File metadata
- Download URL: taiwan_payroll-1.0.0.tar.gz
- Upload date:
- Size: 14.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0fbe5056f8633b9303e14596729e2792667bb36418fe9c16a6ec186c12db7b21
|
|
| MD5 |
6be1cd1744f69a0c0656fe16665b17ff
|
|
| BLAKE2b-256 |
85aae1c9ce469f93344117f0f8fa9e40c6ecc4f073d911d53c5d1ea7ee06fe72
|
File details
Details for the file taiwan_payroll-1.0.0-py3-none-any.whl.
File metadata
- Download URL: taiwan_payroll-1.0.0-py3-none-any.whl
- Upload date:
- Size: 23.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: uv/0.7.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca0e73820529daec35db1a6299fb19f1d9f8dbec277cfbab6466da9d11259c57
|
|
| MD5 |
4ffa6ff3fabe8985467c534cd3e82ff4
|
|
| BLAKE2b-256 |
a5a1809178482c82b720608dd57d2ac4ce4769c981eb259e11f68d60e7a679ef
|