Skip to main content

a thin wrapper for epanet hydraulic toolkit

Project description

epanet python package

A slender, auto-generated python wrapper around the owa:epanet hydraulic network analysis toolkit. This package uses SWIG and scikit-build to generate python bindings into the C library. The objective of this package is to establish basic python support for the toolkit, rather than present a "pythonic" interface. More abstractions can be built atop this package to further abstract the API, but the set of functions here is meant to (as closely as practical) mirror the well-known and established C API.

Where possible, SWIG has been configured to throw warnings/exceptions instead of using the customary EPANET return integer value for success-checking. Also any output (pointer) parameters from the C API have been re-routed to return values. In these cases, the return tuple from the Python API will contain the values desired.

Building the libraries

Ensure the EPANET subproject is initialized by running git submodule update --init (if necessary) and running the following commands (on Windows skip the line ./script/clean.sh). The following method uses scikit-build to invoke cmake for compiling and linking the shared libaries, and builds a python wheel.

./scripts/clean.sh
python3 setup.py sdist bdist_wheel

Test your builds using the following commands.

cd test && \
pipenv install ../dist/*.whl && \
pipenv install pytest && \
pipenv run pytest

This python library was packaged in the following way:

python3 setup.py sdist bdist_wheel
python3 -m twine upload dist/*

Project details


Download files

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

Source Distribution

owa-epanet-2.2.1.tar.gz (793.0 kB view details)

Uploaded Source

Built Distribution

owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl (181.3 kB view details)

Uploaded CPython 3.7mmacOS 10.9+ x86-64

File details

Details for the file owa-epanet-2.2.1.tar.gz.

File metadata

  • Download URL: owa-epanet-2.2.1.tar.gz
  • Upload date:
  • Size: 793.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.6

File hashes

Hashes for owa-epanet-2.2.1.tar.gz
Algorithm Hash digest
SHA256 35cacf31456ca55fe2bcbf07599636e8065b754b9fefcec0899190d145256093
MD5 eae6cb86a222a028dbe5e1f12e88eff5
BLAKE2b-256 5d302c9c52709fe41c8a13c504e57a008ac22a6e008f2668b48e9ab3a3e0bbb1

See more details on using hashes here.

File details

Details for the file owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 181.3 kB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.6

File hashes

Hashes for owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 c7a66b1886016e3aee4070b5a15a22cefdbeec6ed82b1584257c8960ccbfdb8e
MD5 eec3f7a2a8e74107aaf41d78291c1fc1
BLAKE2b-256 ed0807ab6c3a8e1f2596396d58f8bf6043f39f899470377c1b06d1eb2d53b075

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page