Skip to main content

EasySewer

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 easysewer==2.0.1
python -c "from easysewer import Model; print(Model())"

Python 3.10+ is required. The PyPI distribution includes x86-64 Windows/Linux native solver libraries for 64-bit Python. Bundled Linux solvers require glibc 2.33+ and libgomp.so.1. Simulation requires a compatible native backend; package installation alone does not establish solver availability on every platform. Modeling, conversion and pure result reading do not require a native solver. See installation and backend checks.

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:

  1. Open Source: Unlike commercial software like MATLAB, Python lowers the barrier to entry.
  2. GIS Integration: Mainstream GIS software (ArcGIS and QGIS) uses Python as a scripting language, facilitating interaction between drainage models and GIS systems.
  3. 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:

  • pyswmm only encapsulates the basic functions of the SWMM native API. While it can modify existing parameters, it cannot dynamically edit the model structure.
  • swmm_api supports 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 and swmmtoolbox for 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.0.1

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

Source distribution (sdist)

Source distribution for easysewer 2.0.1
File Size Uploaded Provenance Actions
easysewer-2.0.1.tar.gz 4.0 MB With provenance Details for easysewer-2.0.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for easysewer 2.0.1
File Interpreter ABI Platform Actions
easysewer-2.0.1-py3-none-any.whl Python 3 none any Details for easysewer-2.0.1-py3-none-any.whl

Total release size: 6.6 MB

Release files / easysewer-2.0.1.tar.gz

Download URL easysewer-2.0.1.tar.gz
Size 4.0 MB
Tags Source
SHA-256 checksum
How to use checksums
bf833c72eb2f7c6e093daa45618268e31bbc361bdecc147508d0e7e92924314e
BLAKE2b-256 checksum
How to use checksums
16586c9ff69c69dde207765d6aafe45704a7a48013e1840b70e66fe4278b15fb
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 9, 2026.

Transparency log

Release files / easysewer-2.0.1-py3-none-any.whl

Download URL easysewer-2.0.1-py3-none-any.whl
Size 2.7 MB
Tags Python 3
SHA-256 checksum
How to use checksums
867f0827a4b62976ea9033e6f57c47d782064c21ac554ea1ecfced5c8e35e8b1
BLAKE2b-256 checksum
How to use checksums
518a9bb57f382a50dd8e6ad865520ac5696abe8dff6b41bd2055a96f091790a0
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 9, 2026.

Transparency log

Security for easysewer 2.0.1

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

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for easysewer-2.0.1.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 9, 2026.

Transparency log

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