EasySewer
An urban drainage modeling toolkit
EasySewer 2.0 uses from easysewer import Model for its typed model API.
See the delivery scope and follow-up work,
first runnable example and model guide.
EasySewer 2.0 does not support 1.x APIs or proprietary data migration.
Use the 2.0 model/runtime APIs and standard SWMM INP or current Model JSON.
Installation
python -m pip install --upgrade easysewer==2.1.0
python -c "from easysewer import Model; print(Model())"
EasySewer 2.1.0 requires Python 3.10 or later; CPython 3.10–3.14 is tested. It provides platform-specific native wheels for:
| Platform | Native runtime baseline |
|---|---|
| Windows x86-64 | 64-bit x64 Python on compatible Windows x64 |
| Linux x86-64 | glibc 2.33 or later |
| Linux ARM64 (aarch64) | glibc 2.28 or later |
| Apple Silicon macOS (arm64) | macOS 14 deployment target; release CI on macOS 15 and 26 |
These wheels contain standard SWMM 5.2.4, the native OUT reader and their non-system native dependencies. A compiler or separate system OpenMP installation is not needed to use a supported wheel. Use a native 64-bit Python interpreter and a current pip so it can select the matching platform wheel. The macOS 14.8.9 execution record binds an earlier exact artifact, not the final 2.1.0 wheel or initial macOS 14.0.
Version 2.1.0 also fixes the Windows virtual-environment worker launch failure reported in issue #5, while keeping worker identity and lifetime checks. Upgrade from 2.0.1 to obtain these changes; the immutable 2.0.1 files do not gain ARM support or the diagnostic command.
Check the installed runtime before a simulation:
python -m easysewer doctor
python -m easysewer doctor --json
python -m easysewer doctor --smoke-test --timeout 30
The default check loads libraries only in disposable processes; it does not solve a model, write simulation files or install anything. The optional smoke test solves a minimal model in a temporary directory. Readiness is not a guarantee of numerical or scientific validity. FlexiblePonding remains an experimental, scientifically unvalidated example of a replaceable backend, preserved on x86-64 and optional on ARM. A requested backend is never silently replaced.
Intel macOS, Windows ARM64 Python, musl Linux, 32-bit Python and universal2
are not supported native targets. Native checkpoint archives bind exact runtime
bytes and ABI; keep the original runtime for older archives. Cross-architecture
checkpoint continuation is not supported.
Modeling, conversion and pure result reading do not require a native solver. See the 2.1.0 release notes, installation, supported ABIs and doctor exit codes and native build and qualification instructions.
See the documentation index for installation, the Quick Start notebook, modeling, runtime, results, maintenance and known limits. The editable network example demonstrates reference updates and transaction rollback.
Introduction
Urban drainage models are essential tools for studying urban flooding issues, capable of simulating flooding processes under various rainfall scenarios. With advancements in computing technology, applying these models to large-scale areas for hydraulic calculation has become feasible. However, drainage systems comprise numerous elements, and the modeling process often involves collecting, converting, and integrating data from raw sources such as statistical tables, design drawings, or GIS systems. Consequently, this process is often tedious and time-consuming.
While modern tools like SWMM provide graphical user interfaces (GUIs) that allow users to intuitively view and modify drainage models, these manual operations—relying heavily on mouse and keyboard inputs—are inefficient, repetitive, and dependent on human experience. They are typically suitable only for modeling small areas. To efficiently and reliably model large-scale urban drainage systems, using scripts and APIs is an effective approach, enabling rapid data conversion and automated processing. Therefore, in practical urban drainage modeling, API-based scripted modeling is often a necessary choice.
Motivation
As the most widely used urban drainage model, SWMM provides a C-based API. However, its native interface only offers functions for computational control (such as reading data during simulation) and does not support adding or modifying the model's structure (e.g., adding a new pipe via the API). This limits the automation and flexibility of modeling.
To address this, many scholars and engineers have developed packages based on different programming languages to extend SWMM's functionality, including swmmr (R), MatSWMM (MATLAB), and Python-based packages like swmm_api and pyswmm. Compared to other languages, Python demonstrates significant advantages:
- Open Source: Unlike commercial software like MATLAB, Python lowers the barrier to entry.
- GIS Integration: Mainstream GIS software (ArcGIS and QGIS) uses Python as a scripting language, facilitating interaction between drainage models and GIS systems.
- Ecosystem: With its popularity in scientific computing and AI, Python offers a vast community and rich open-source libraries.
However, current Python-based SWMM packages still have limitations:
pyswmmonly encapsulates the basic functions of the SWMM native API. While it can modify existing parameters, it cannot dynamically edit the model structure.swmm_apisupports topological modifications (nodes and pipes) but lacks support for the SWMM native API. This means model calculation and result parsing rely on third-party tools (e.g., dependent on a local pre-compiled SWMM engine for calculation andswmmtoolboxfor result parsing).
These limitations lead to complex toolchain dependencies and increased requirements for user experience, restricting the efficiency of urban drainage system modeling.
Features
To overcome these challenges, this project develops EasySewer, an open-source Python package. It integrates the following functionalities to provide a comprehensive solution for SWMM modeling:
- Integrated Modeling: Supports dynamic editing of model structures.
- Calculation: Built-in capabilities to run simulations.
- Result Parsing: Native support for parsing simulation results.
EasySewer aims to provide a robust supplementary solution to existing SWMM modeling tools, streamlining the workflow from data to results.
Metadata
Release files for easysewer 2.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 |
|---|---|---|---|---|
| easysewer-2.1.0.tar.gz | 4.1 MB | With provenance | Details for easysewer-2.1.0.tar.gz |
Built distributions (wheels)
| File | Actions Reset | |||
|---|---|---|---|---|
| easysewer-2.1.0-py3-none-win_amd64.whl | Python 3 | none | Windows x86-64 | Details for easysewer-2.1.0-py3-none-win_amd64.whl |
| easysewer-2.1.0-py3-none-manylinux_2_33_x86_64.whl | Python 3 | none | Linux glibc 2.33+ x86-64 | Details for easysewer-2.1.0-py3-none-manylinux_2_33_x86_64.whl |
| easysewer-2.1.0-py3-none-manylinux_2_28_aarch64.whl | Python 3 | none | Linux glibc 2.28+ ARM64 | Details for easysewer-2.1.0-py3-none-manylinux_2_28_aarch64.whl |
| easysewer-2.1.0-py3-none-macosx_14_0_arm64.whl | Python 3 | none | macOS 14.0+ ARM64 | Details for easysewer-2.1.0-py3-none-macosx_14_0_arm64.whl |
Total release size: 9.9 MB
Release files / easysewer-2.1.0.tar.gz
| Download URL | easysewer-2.1.0.tar.gz |
|---|---|
| Size | 4.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1d0e8d05ff7accc03d6b48f36092999777b69124d1c0fbfc84c33ac9c5b71a22
|
|
BLAKE2b-256 checksum How to use checksums |
0309a7408b79982ddef7c0690fe4175f90e9a1a37d24a32752b3fc2d5e1109eb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / easysewer-2.1.0-py3-none-win_amd64.whl
| Download URL | easysewer-2.1.0-py3-none-win_amd64.whl |
|---|---|
| Size | 2.0 MB |
| Tags | Python 3 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
595739bba84536dc72d4e12858c93e485347afcd9220ce8e6220bc5f5010ba90
|
|
BLAKE2b-256 checksum How to use checksums |
1e30e8223c86d14fba65d921887cab8a2359dd0e9560ad8c44c20fd6f0ef3d30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / easysewer-2.1.0-py3-none-manylinux_2_33_x86_64.whl
| Download URL | easysewer-2.1.0-py3-none-manylinux_2_33_x86_64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | Linux glibc 2.33+ x86-64 Python 3 |
|
SHA-256 checksum How to use checksums |
091afaaf6d1975336229ceaecf22c6c68ddd32454b59220b34fe233a2ae74799
|
|
BLAKE2b-256 checksum How to use checksums |
654ca51c1e99d011c584be2488706ea29e50df0baaa196ede1f28bfac4f0076a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / easysewer-2.1.0-py3-none-manylinux_2_28_aarch64.whl
| Download URL | easysewer-2.1.0-py3-none-manylinux_2_28_aarch64.whl |
|---|---|
| Size | 1.1 MB |
| Tags | Linux glibc 2.28+ ARM64 Python 3 |
|
SHA-256 checksum How to use checksums |
895f9591cbc47163bbedbdc584275244958f3b1fb37d61e69d8395a59a5986e8
|
|
BLAKE2b-256 checksum How to use checksums |
943665aecc35b09056718ac87b95cce76a52abf448ccd8d0aa479450cef6349a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logRelease files / easysewer-2.1.0-py3-none-macosx_14_0_arm64.whl
| Download URL | easysewer-2.1.0-py3-none-macosx_14_0_arm64.whl |
|---|---|
| Size | 1.3 MB |
| Tags | Python 3 macOS 14.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
355a460b1c913fcf58970208e994ee98554602c9d67a504151eb1cba7c7de798
|
|
BLAKE2b-256 checksum How to use checksums |
c1c0421f480d332616fdd32350cab6b94546dcb12bef77dba1cee9ddeceab65f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logSecurity for easysewer 2.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.
Full provenance
All 5 files in this release have been uploaded with provenance metadata.
Attestation for easysewer-2.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 22, 2026.
Transparency logA 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.