{"id":13949115,"url":"https://github.com/pyswmm/pyswmm","last_synced_at":"2026-02-21T12:01:29.078Z","repository":{"id":16937933,"uuid":"19699787","full_name":"pyswmm/pyswmm","owner":"pyswmm","description":"Python Wrappers for SWMM","archived":false,"fork":false,"pushed_at":"2026-02-12T14:18:12.000Z","size":14867,"stargazers_count":351,"open_issues_count":12,"forks_count":151,"subscribers_count":29,"default_branch":"main","last_synced_at":"2026-02-16T15:02:55.072Z","etag":null,"topics":["hydraulic-modeling","hydrology-stormwater-analysis","python","stormwater","swmm","swmm5"],"latest_commit_sha":null,"homepage":"https://www.pyswmm.org","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pyswmm.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2014-05-12T13:30:03.000Z","updated_at":"2026-02-11T14:13:40.000Z","dependencies_parsed_at":"2023-02-16T08:02:10.327Z","dependency_job_id":"6dbc18fd-a208-48cd-ab1e-2e7e3da272b8","html_url":"https://github.com/pyswmm/pyswmm","commit_stats":{"total_commits":765,"total_committers":24,"mean_commits":31.875,"dds":0.550326797385621,"last_synced_commit":"8e784654c737114bd76584cd30ad643128258398"},"previous_names":["openwateranalytics/pyswmm"],"tags_count":33,"template":false,"template_full_name":null,"purl":"pkg:github/pyswmm/pyswmm","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyswmm%2Fpyswmm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyswmm%2Fpyswmm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyswmm%2Fpyswmm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyswmm%2Fpyswmm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pyswmm","download_url":"https://codeload.github.com/pyswmm/pyswmm/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pyswmm%2Fpyswmm/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29566648,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-18T00:47:08.760Z","status":"online","status_checked_at":"2026-02-18T02:00:09.468Z","response_time":162,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hydraulic-modeling","hydrology-stormwater-analysis","python","stormwater","swmm","swmm5"],"created_at":"2024-08-08T05:01:38.641Z","updated_at":"2026-02-21T12:01:29.066Z","avatar_url":"https://github.com/pyswmm.png","language":"Python","funding_links":[],"categories":["Natural Resources"],"sub_categories":["Water Supply and Quality"],"readme":"\u003cdiv align=\"center\" style=\"max-width:500px;margin: auto;\"\u003e\n  \u003cimg src=\"https://raw.githubusercontent.com/pyswmm/pyswmm/master/docs/source/_static/type-logo-black.png\"\u003e\u003cbr\u003e\n\u003c/div\u003e\n\n\n# python wrappers for the Stormwater Management Model (SWMM5)\n\n[![Build Wheels](https://github.com/pyswmm/pyswmm/actions/workflows/python-package.yml/badge.svg)](https://github.com/pyswmm/pyswmm/actions/workflows/python-package.yml)\n[![Documentation Status](https://github.com/pyswmm/pyswmm/actions/workflows/documentation.yml/badge.svg?branch=main)](http://docs.pyswmm.org/)\n[![Python Versions](https://img.shields.io/badge/python-3.10%20%7C%203.11%20%7C%203.12-blue.svg)](https://python.org)\n[![License](https://img.shields.io/pypi/l/pyswmm.svg)](LICENSE.txt)\n[![Latest PyPI version](https://img.shields.io/pypi/v/pyswmm.svg)](https://pypi.python.org/pypi/pyswmm/)\n[![PyPI Monthly Downloads](https://img.shields.io/badge/dynamic/json.svg?label=Downloads\u0026url=https%3A%2F%2Fpypistats.org%2Fapi%2Fpackages%2Fpyswmm%2Frecent\u0026query=%24.data.last_month\u0026colorB=green\u0026suffix=%20last%20month)](https://pypi.python.org/pypi/pyswmm/)\n[![Cite our Paper](https://joss.theoj.org/papers/10.21105/joss.02292/status.svg)](https://doi.org/10.21105/joss.02292)\n[![Discord](https://img.shields.io/badge/Discord-Join%20Chat-7289da?logo=discord\u0026logoColor=white)](https://discord.gg/U8wqxgjt9C)\n\n## Getting started\n\n* Project Website: [www.pyswmm.org](https://www.pyswmm.org)\n\n* [Official PySWMM Documentation](http://docs.pyswmm.org)\n\n* [PySWMM YouTube Channel](https://www.youtube.com/channel/UCv-OYsz2moiMRzZIRhqbpHA/featured)\n\n\n* [PySWMM Example Bundles](https://www.pyswmm.org/examples)\n\nIntroducing the SWAG STORE! All Proceeds go toward the hosting/service fees related to maintaining the PySWMM Project!!!  Get yourself a hoodie or coffee cup!\n\n\n* [PySWMM SWAG Store](https://www.zazzle.com/store/pyswmm)\n\n🆘Do you need HELP?🆘\n\u003e [GitHub Discussions](https://github.com/pyswmm/pyswmm/discussions)\n\u003e to answer support questions related to PySWMM.\n\nCite our Paper  \n\u003e McDonnell, Bryant E., Ratliff, Katherine M., Tryby, Michael E., Wu,\n\u003e Jennifer Jia Xin, \u0026 Mullapudi, Abhiram. (2020). PySWMM: The Python\n\u003e Interface to Stormwater Management Model (SWMM). *Journal of Open\n\u003e Source Software, 5*(52), 2292, \u003chttps://doi.org/10.21105/joss.02292\u003e\n\n# YouTube Training Videos\n\nSetting a manhole inflow during a running simulation!  \n\u003e [![image](http://img.youtube.com/vi/i4AOHwKyvNw/0.jpg)](https://www.youtube.com/watch?v=i4AOHwKyvNw)\n\n# Overview\n\nPySWMM is a Python language software package for the creation,\nmanipulation, and study of the structure, dynamics, and function of\ncomplex networks.\n\nWith PySWMM you can load and manipulate USEPA Stormwater Management\nModels. With the development of PySWMM, control algorithms can now be\ndeveloped exclusively in Python which allows the use of functions and\nobjects as well as storing and tracking hydraulic trends for control\nactions.\n\nAs of version v1.1.0, PySWMM includes new features to process metadata\nand timeseries stored in SWMM binary output file.\n\n# Who uses PySWMM?\n\nPySWMM is used by engineers, modelers, and researchers who want to\nstreamline stormwater modeling optimization, controls, and\npost-processing results.\n\n# Goals\n\nPySWMM is intended to provide\n\n-   tools for the study of the structure and dynamics within USEPA\n    SWMM5,\n-   a standard programming interface and graph implementation that is\n    suitable for many applications,\n-   a rapid development environment for collaborative, multidisciplinary\n    projects,\n-   an interface to USEPA SWMM5,\n-   development and implementation of control logic outside of native\n    EPA-SWMM Controls,\n-   methods for users to establish their own node inflows,\n-   a coding interface to binary output files,\n-   new modeling possibilities for the SWMM5 Community.\n\n# Install\n\nGet the latest version of PySWMM from\n[PyPI](https://pypi.python.org/pypi/pyswmm/) See the [Quick\nGuide](https://www.pyswmm.org/docs)!\n\n```\n$ pip install pyswmm\n```\nAs of version 1.3.1, pyswmm can be installed with specific versions of the SWMM engine ranging from 5.1.14 to 5.2.4 using pip extras:\n\n```\n$ pip install pyswmm[swmm5.2.4]\n```\n\n# Usage\n\nA quick example that steps through a simulation:\n\nExamples:\n\nSee the [Latte Example](https://www.pyswmm.org/examples)\n\n``` python\nfrom pyswmm import Simulation, Nodes, Links\n\nwith Simulation(r'Example1.inp') as sim:\n    Node21 = Nodes(sim)[\"21\"]\n    print(\"Invert Elevation: {}\". format(Node21.invert_elevation))\n\n    Link15 = Links(sim)['15']\n    print(\"Outlet Node ID: {}\".format(Link15.outlet_node))\n\n    # Launch a simulation!\n    for ind, step in enumerate(sim):\n        if ind % 100 == 0:\n            print(sim.current_time,\",\",round(sim.percent_complete*100),\"%\",\\\n                  Node21.depth, Link15.flow)\n```\n\nOpening a SWMM binary output file and accessing model metadata and\ntimeseries.\n\n``` python\nfrom pyswmm import Output, SubcatchSeries, NodeSeries, LinkSeries, SystemSeries\n\nwith Output('model.out') as out:\n    print(len(out.subcatchments))\n    print(len(out.nodes))\n    print(len(out.links))\n    print(out.version)\n\n    sub_ts = SubcatchSeries(out)['S1'].runoff_rate\n    node_ts = NodeSeries(out)['J1'].invert_depth\n    link_ts = LinkSeries(out)['C2'].flow_rate\n    sys_ts = SystemSeries(out).rainfall\n```\n\n# Contributing\n\nPlease check out our Wiki\n\u003chttps://github.com/pyswmm/pyswmm/wiki\u003e for more information\non contributing, including an Author Contribution Checklist.\n\n# Bugs\n\nOur issue tracker is at\n\u003chttps://github.com/pyswmm/pyswmm/issues\u003e. Please report any\nbugs that you find. Or, even better, fork the repository on GitHub and\ncreate a pull request. All changes are welcome, big or small, and we\nwill help you make the pull request if you are new to git (just ask on\nthe issue).\n\n# License\n\nDistributed with a BSD2 license; see LICENSE.txt:\n\n    Copyright (C) 2014-2025 (See Authors)\n    Community-Owned See AUTHORS and CITATION.cff\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyswmm%2Fpyswmm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyswmm%2Fpyswmm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyswmm%2Fpyswmm/lists"}