Microservice for calculating pump horsepower needs based on pipe diameter, distance, suction loss, static head, flow rate, temperature, and material.
templates | ||
pumpcalc.py | ||
README.md | ||
requirements.txt |
PumpCalc Documentation
Overview
PumpCalc is a Python-based web application built using FastAPI for calculating pump power requirements and hydraulic parameters.
Installation
-
Clone the Repository:
git clone https://sij.ai/sij/pumpcalc cd pumpcalc
-
Install Dependencies:
pip install -r requirements.txt
-
Run the Application:
python3 pumpcalc.py
The app will be available at
http://127.0.0.1:8901
.
Endpoints
-
GET /
The web interface for data entry and calculations. -
GET /calculate
Performs pump calculations based on query parameters such aspipe_diameter
,distance
,suction_loss
,static_head
,flow_rate
, etc.
Example Caddyfile
To serve PumpCalc using Caddy:
pumpcalc.yourdomain.tld {
reverse_proxy localhost:8901
tls {
dns cloudflare {env.CLOUDFLARE_API_TOKEN}
}
}