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.

Installation

To install with pip:

pip install owa-epanet

Wheels are now provided for most installations, some extra work will be needed if installing from source.

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/*

Versioning

This package loosely follows EPANET's release version numbers. Its major and minor numbers will correspond to the given EPANET version, but the patch number is independent. This system might change in the future.

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.3.5.tar.gz (995.9 kB view details)

Uploaded Source

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

owa_epanet-2.3.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (570.9 kB view details)

Uploaded CPython 3.12manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

owa_epanet-2.3.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl (570.3 kB view details)

Uploaded CPython 3.11manylinux: glibc 2.24+ x86-64manylinux: glibc 2.28+ x86-64

owa_epanet-2.3.5-cp311-cp311-macosx_11_0_arm64.whl (331.0 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

File details

Details for the file owa_epanet-2.3.5.tar.gz.

File metadata

  • Download URL: owa_epanet-2.3.5.tar.gz
  • Upload date:
  • Size: 995.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for owa_epanet-2.3.5.tar.gz
Algorithm Hash digest
SHA256 e857741a6a9f093c7d58f0a57ff2e8efe2a9ac223c1fdd4fa3218079c8b7aac6
MD5 0b9c1de35e763862757075f5dd62e212
BLAKE2b-256 51c7128527894673ef527111cc2646c60642d0e0284ab49e4c2f27a648af9e6b

See more details on using hashes here.

File details

Details for the file owa_epanet-2.3.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for owa_epanet-2.3.5-cp312-cp312-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 73c2e41b24776845f9b203600f1624b929438e13890d1965947b5b176715b938
MD5 6c40acea54ea805d2610ef4d4c26d3b2
BLAKE2b-256 ef35cd8c665a45b7c2e1a55fc2cfce31c005261997424a2118153e1ed8b5376f

See more details on using hashes here.

File details

Details for the file owa_epanet-2.3.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for owa_epanet-2.3.5-cp311-cp311-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6cbd460a5fc95e36894add9f3d82653d9bd4576f4b6cd9373abaef374d004ade
MD5 5f485a40ff5bf8b5dc2e65b917befc5a
BLAKE2b-256 0ad2a96dae18685597e7b5c55a090b9f87edee59d83dc9901a38fe51fc84c404

See more details on using hashes here.

File details

Details for the file owa_epanet-2.3.5-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for owa_epanet-2.3.5-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 e9d95e71c495ee6d46766332eb44adcd2551f40ac37efab536f2c7c7a26bfabb
MD5 08faf0ff4468c169e46c50c90f33b04f
BLAKE2b-256 f05ac4f83bb66b3a19f4feb9db920cfeeb119e0f4db23fd77fe0eea9bde7c116

See more details on using hashes here.

Supported by

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