Skip to main content

OWA SWMM Python Toolkit

Project description

swmm-toolkit

swmm-toolkit contains SWIG generated Python wrappers for the swmm-solver and swmm-output libraries.

Features

swmm-toolkit makes SWMM a fully fledged Python extension with:

  • Python integration at the speed of C
  • Full access to library APIs
  • Pythonic naming, enums, exceptions, and return value handling

Installation

Build

  1. Initialize submodule
git submodule init
git submodule update 
  1. Create virtual environment
  2. pip install from requirements.txt
  3. python setup.py build

Troubleshoot

Steps to try if python setup.py build fails

Establish working swmm-solver build

  1. Create an environment variable BOOST_ROOT_1_67_0 and set the variable to boost install location
  2. Confirm swmm-solver directory is initialized
  3. Confirm swmm-solver build is working
cd swmm-solver 
mkdir buildprod
cd buildprod
cmake -G "Visual Studio 14 2015 Win64" ..
cmake --build . --config Release --target install 

Basic Usage

Run a SWMM simulation.

from swmm.toolkit import solver

solver.run('input_file.inp', 'report_file.rpt', 'output_file.out')

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for swmm-toolkit, version 0.8.2
Filename, size File type Python version Upload date Hashes
Filename, size swmm_toolkit-0.8.2-cp39-cp39-win_amd64.whl (905.6 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (457.9 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp39-cp39-macosx_10_9_x86_64.whl (576.4 kB) File type Wheel Python version cp39 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp38-cp38-win_amd64.whl (905.8 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (458.7 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp38-cp38-macosx_10_9_x86_64.whl (576.9 kB) File type Wheel Python version cp38 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp37-cp37m-win_amd64.whl (906.0 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (457.7 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp37-cp37m-macosx_10_9_x86_64.whl (576.4 kB) File type Wheel Python version cp37 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp36-cp36m-win_amd64.whl (906.0 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (457.7 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size swmm_toolkit-0.8.2-cp36-cp36m-macosx_10_9_x86_64.whl (576.4 kB) File type Wheel Python version cp36 Upload date Hashes View
Filename, size swmm-toolkit-0.8.2.zip (623.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page