Update README.md

This commit is contained in:
Sangye Ince-Johannsen 2025-01-18 01:05:21 +00:00
parent caeb1ce00f
commit 4aa06189a5

View file

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