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/*
Metadata
Release files for owa-epanet 2.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| owa-epanet-2.2.1.tar.gz | 793.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | macOS 10.9+ x86-64 | Details |
Total release size: 974.3 kB
Release files / owa-epanet-2.2.1.tar.gz
| Download URL | owa-epanet-2.2.1.tar.gz |
|---|---|
| Size | 793.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
35cacf31456ca55fe2bcbf07599636e8065b754b9fefcec0899190d145256093
|
|
BLAKE2b-256 checksum How to use checksums |
5d302c9c52709fe41c8a13c504e57a008ac22a6e008f2668b48e9ab3a3e0bbb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|
Release files / owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl
| Download URL | owa_epanet-2.2.1-cp37-cp37m-macosx_10_9_x86_64.whl |
|---|---|
| Size | 181.3 kB |
| Tags | CPython 3.7 CPython 3.7 pymalloc macOS 10.9+ x86-64 |
|
SHA-256 checksum How to use checksums |
c7a66b1886016e3aee4070b5a15a22cefdbeec6ed82b1584257c8960ccbfdb8e
|
|
BLAKE2b-256 checksum How to use checksums |
ed0807ab6c3a8e1f2596396d58f8bf6043f39f899470377c1b06d1eb2d53b075
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|