Skip to main content

stormsewer

Storm sewer hydrology and hydraulics for Python: Rational method, Manning, standard-step HGL/EGL backwater, and HEC-22 inlets. The same Rust engine that powers the StormSewer desktop app, exposed as a native extension — no Python dependencies, no server.

pip install stormsewer

Primitives

Float in, float out. Useful for replacing a spreadsheet column.

import stormsewer as ss

ss.intensity(60, 10, 0.8, 12)          # IDF: i = a/(t+b)^c  ->  5.0607 in/hr
ss.rational_q(0.70, 5.0607, 1.0)       # Q = C i A           ->  3.5425 cfs
ss.manning_capacity(1.25, 0.013, 0.005)  # just-full capacity ->  4.5801 cfs
ss.normal_depth(3.5425, 1.25, 0.013, 0.005)  # -> 0.8254 ft (None if it won't fit)
ss.critical_depth(3.5425, 1.25)
ss.circular_geometry(1.25, 0.8254)
# {'area': 0.8597, 'wetted_perimeter': ..., 'hydraulic_radius': ..., 'top_width': ...}

Pass si=True for metric: the Manning factor becomes 1.0 and g becomes 9.81.

ss.manning_capacity(0.4, 0.013, 0.005, si=True)   # m3/s

Whole networks

import stormsewer as ss
import pandas as pd

result = ss.analyze_project(ss.demo_project_json())

pipes = pd.DataFrame(result["pipes"])
print(pipes[["id", "design_q", "capacity", "pct_full", "velocity", "hgl_up"]])

nodes = pd.DataFrame(result["nodes"])
print(nodes[nodes.floods])          # anything surcharging to the surface

analyze_file("project.ssproj") reads a file saved by the desktop app, and analyze_ssn(text) takes the plain-text network format:

ss.analyze_ssn("""
IDF        60 10 0.8
TAILWATER  100.5
MINTC      10

NODE N1   inlet    0    0  104.0  110.0  1.0  0.70  12
NODE OUT  outfall  300  0  102.5  108.5

PIPE P1   N1  OUT  300  1.25  0.013
""")

Each pipe dict carries id, from, to, slope, total_ca, tc, travel_time, intensity, design_q, capacity, pct_full, velocity, normal_depth, critical_depth, hgl_up, hgl_dn, and surcharged. Each node dict carries id, tc, rim, hgl, freeboard, and floods.

Constants

K_MANNING_US (1.486), K_MANNING_SI (1.0), G_US (32.2), G_SI (9.81).

StormSewer uses K = 1.486, the exact unit conversion, matching Autodesk Hydraflow and HEC-22 rather than the 1.486 some spreadsheets use — a 0.27% difference in capacity. See VALIDATION.md, which works every number on a reference network by hand.

What this is not

It computes the published equations; it does not decide whether the Rational method suits your site, what C to use, or which storm to design for. Those stay with the engineer sealing the drawing.

License

GPL-3.0-or-later, like the rest of StormSewer.

Metadata

Release files for stormsewer 0.10.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for stormsewer 0.10.0
File Size Uploaded Provenance Actions
stormsewer-0.10.0.tar.gz 1.4 MB Without provenance Details for stormsewer-0.10.0.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for stormsewer 0.10.0
File Interpreter ABI Platform Actions
stormsewer-0.10.0-cp39-abi3-win_amd64.whl CPython 3.9 abi3 Windows x86-64 Details for stormsewer-0.10.0-cp39-abi3-win_amd64.whl
stormsewer-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl CPython 3.9 abi3 Linux glibc 2.17+ x86-64 Details for stormsewer-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
stormsewer-0.10.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64), macOS 10.12+ x86-64, macOS 11.0+ ARM64 Details for stormsewer-0.10.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Total release size: 2.9 MB

Release files / stormsewer-0.10.0.tar.gz

Download URL stormsewer-0.10.0.tar.gz
Size 1.4 MB
Tags Source
SHA-256 checksum
How to use checksums
894d4ef40ce773c5fa5acf958a532314150c3fd3364b92bacef9b05ff9172da2
BLAKE2b-256 checksum
How to use checksums
79ff51f6f3e6256bcbe2c603c976e334d7ff6419744e3688dfa129b1c7498eba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / stormsewer-0.10.0-cp39-abi3-win_amd64.whl

Download URL stormsewer-0.10.0-cp39-abi3-win_amd64.whl
Size 334.7 kB
Tags CPython 3.9 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
444a157501b7f9b0e5bd5c18cc8d16bfd31b75cbf0d54bcaa6726ed9a18f6f24
BLAKE2b-256 checksum
How to use checksums
b2ab0155ca793d0c546f9384bb2aec3061f5ef26cd210ce182891d1110858cdf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / stormsewer-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl

Download URL stormsewer-0.10.0-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Size 411.5 kB
Tags CPython 3.9 Linux glibc 2.17+ x86-64 abi3
SHA-256 checksum
How to use checksums
e38c6e140384114b8c0f3562148df7a7cac822251b7a588dfe8d86a94634dc80
BLAKE2b-256 checksum
How to use checksums
e84482c520a1334c84737ad3d005823ca01e16ed5770173c2f92d3a97f9da747
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Release files / stormsewer-0.10.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl

Download URL stormsewer-0.10.0-cp39-abi3-macosx_10_12_x86_64.macosx_11_0_arm64.macosx_10_12_universal2.whl
Size 708.5 kB
Tags CPython 3.9 abi3 macOS 10.12+ universal2 (ARM64, x86-64) macOS 10.12+ x86-64 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
93830464eee6b2e7570142729f3a33ef96aa5aa1dc77874d92dda275b243aef2
BLAKE2b-256 checksum
How to use checksums
463cd406f76a2ee8231794d31518517090b75d81c441f5ae51d25ca467ed69ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.15.0

Security for stormsewer 0.10.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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page