PyFatiguePro
Physics-informed fatigue-life prediction library for engineering and aeroengine alloys.
PyFatiguePro combines classical fatigue mechanics, FEA result ingestion, proprietary experimental data validation, machine learning, SHAP explainability, uncertainty estimation, REST API deployment, Docker, tests, and CI/CD.
Features
- Basquin S-N high-cycle fatigue model
- Coffin-Manson strain-life low-cycle fatigue model
- Paris Law crack-growth integration
- Goodman and Gerber mean-stress corrections
- Von Mises multiaxial stress calculation
- FEA CSV ingestion from Abaqus/ANSYS-style exports
- FEA hotspot feature extraction
- Proprietary-data validation and anonymization
- Dataset provenance registry
- Scalable ML training using Random Forest / HistGradientBoosting / GPR
- Batch prediction for large CSV files
- Uncertainty estimation
- SHAP explainability support
- Sensitivity analysis
- FastAPI REST API
- Docker deployment
- GitHub Actions CI/CD
Data disclaimer
This package does not ship proprietary or unpublished fatigue datasets. It provides safe workflows to validate, anonymize, and train models on your own internal/proprietary fatigue-test data.
Synthetic examples are demonstration-only and must not be advertised as physical-test validation.
Installation after PyPI upload
pip install pyfatiguepro
Local development install
pip install -e ".[dev,explain]"
Quick example
from pyfatiguepro.core import fit_basquin, basquin_life
stress = [760, 700, 650, 600, 550]
cycles = [1e4, 3e4, 8e4, 2e5, 7e5]
fit = fit_basquin(stress, cycles)
print(fit)
predicted = basquin_life(625, fit["sigma_f_prime"], fit["b"])
print(predicted)
Train demo model
python examples/train_demo.py
This creates model.joblib.
Run API
uvicorn pyfatiguepro.api:app --host 0.0.0.0 --port 8002
Open:
http://127.0.0.1:8002/docs
Docker
docker build -t pyfatiguepro .
docker run -p 8002:8002 pyfatiguepro
PyPI upload
python -m pip install --upgrade build twine
python -m build
twine check dist/*
twine upload --repository testpypi dist/*
twine upload dist/*
After successful real PyPI upload:
pip install pyfatiguepro
Metadata
Release files for pyfatiguepro 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 |
|---|---|---|---|---|
| pyfatiguepro-0.1.0.tar.gz | 12.8 kB | Without provenance | Details for pyfatiguepro-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pyfatiguepro-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for pyfatiguepro-0.1.0-py3-none-any.whl |
Total release size: 25.1 kB
Release files / pyfatiguepro-0.1.0.tar.gz
| Download URL | pyfatiguepro-0.1.0.tar.gz |
|---|---|
| Size | 12.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abe96e106ec7618703259e4c9df6aa3d91f85188ddede6cd500533e45c8add36
|
|
BLAKE2b-256 checksum How to use checksums |
b253557d7bc2fb71b4e013ed198f32986e2efa6ca31152680d66db50430d0735
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Release files / pyfatiguepro-0.1.0-py3-none-any.whl
| Download URL | pyfatiguepro-0.1.0-py3-none-any.whl |
|---|---|
| Size | 12.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
56256cef488674eb323895c4cc9d70268a2280a58310cdf195d804def57db736
|
|
BLAKE2b-256 checksum How to use checksums |
0dfc12a099be7f38ae5a213da09174b8949e012f459ae444fb1e6aaf46c4f09d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.10.9
|
Security for pyfatiguepro 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.