Skip to main content

iwopy

Fraunhofer IWES optimization tools in Python

IWOPY Logo

Overview

The iwopy package is in fact a meta package that provides interfaces to other open-source Python optimization packages out there. Currently this includes

iwopy can thus be understood as an attempt to provide the best of all worlds when it comes to solving optimization problems with Python. This has not yet been achieved, since above list of accessable optimization packages is obviously incomplete, but it's a start. All the credit for implementing the invoked optimizers goes to the original package providers.

The basic idea of iwopy is to provide abstract base classes, that can be concretized for any kind of problem by the users, and the corresponding solver interfaces. However, also some helpful problem wrappers and an original optimizer are provided in addition:

  • Problem wrapper LocalFD: Calculates derivatives by finite differences
  • Problem wrapper RegularDiscretizationGrid: Puts the problem on a Grid
  • Optimizer GG: Greedy Gradient optimization with constraints

All calculations support vectorized evaluation of a complete population of parameters. This is useful for heuristic approaches like genetic algorithms, but also for evaluating gradients. It can lead to a vast speed-up and should be invoked whenever possible. Check the examples (or the API) for details.

Documentation: https://fraunhoferiwes.github.io/iwopy

Source code: https://github.com/FraunhoferIWES/iwopy

PyPi reference: https://pypi.org/project/iwopy/

Anaconda reference: https://anaconda.org/conda-forge/iwopy

Citation

Please cite the JOSS paper IWOPY: Fraunhofer IWES optimization tools in Python

DOI

Bibtex:

@article{Schulte2024,
   doi = {10.21105/joss.06014},
   url = {https://doi.org/10.21105/joss.06014},
   year = {2024},
   publisher = {The Open Journal},
   volume = {9},
   number = {102},
   pages = {6014},
   author = {Jonas Schulte},
   title = {IWOPY: Fraunhofer IWES optimization tools in Python},
   journal = {Journal of Open Source Software}
}

Requirements

The supported Python versions are:

  • Python 3.10
  • Python 3.11
  • Python 3.12
  • Python 3.13

Installation via pip

Virtual Python environment

We recommend working in a Python virtual environment and install iwopy there. Such an environment can be created by

python -m venv /path/to/my_venv

and afterwards be activated by

source /path/to/my_venv/bin/activate

Note that in the above commands /path/to/my_venv is a placeholder that should be replaced by a path to a (non-existing) folder of your choice, for example ~/venv/iwopy.

All subsequent installation commands via pip can then be executed directly within the active environment without changes. After your work with iwopy is done you can leave the environment by the command deactivate.

Standard users

As a standard user, you can install the latest release via pip by

pip install iwopy

This in general corresponds to the main branch at github. Alternatively, you can decide to install the latest pre-release developments (non-stable) by

pip install git+https://github.com/FraunhoferIWES/iwopy@dev#egg=iwopy

Notice that the above default installation does not install the third-party optimization packages. iwopy will tell you in an error message that it is missing a package, with a hint of installation advice. You can avoid this step by installing all supported optimzer packages by installing those optoinal packages by addig [opt]:

pip install iwopy[opt]

or

pip install git+https://github.com/FraunhoferIWES/iwopy@dev#egg=iwopy[opt]

Developers

The first step as a developer is to clone the iwopy repository by

git clone https://github.com/FraunhoferIWES/iwopy.git

Enter the root directory by

cd iwopy

Synchronize the development and test dependencies with

uv sync --extra test --extra dev

Install the pre-commit hooks with

uv run pre-commit install

Installation via conda

Preparation (optional)

It is strongly recommend to use the libmamba dependency solver instead of the default solver. Install it once by

conda install conda-libmamba-solver -n base -c conda-forge

We recommend that you set this to be your default solver, by

conda config --set solver libmamba

Standard users

The iwopy package is available on the channel conda-forge. You can install the latest version by

conda install -c conda-forge iwopy

Developers

For developers using conda, we recommend first installing iwopy as described above, then removing only the iwopy package while keeping the dependencies, and then adding iwopy again from a git using conda develop:

conda install iwopy conda-build -c conda-forge
conda remove iwopy --force
git clone https://github.com/FraunhoferIWES/iwopy.git
cd iwopy
conda develop .

Concerning the git clone line, we actually recommend that you fork iwopy on GitHub and then replace that command by cloning your fork instead.

Testing

For testing, please clone the repository and synchronize the required dependencies:

git clone https://github.com/FraunhoferIWES/iwopy.git
cd iwopy
uv sync --extra test --extra dev

Run the test suite and type checker with

uv run pytest tests
uv run mypy iwopy

Run all repository checks with

uv run pre-commit run --all-files

Contributing

Please feel invited to contribute to iwopy! Here is how:

  1. Fork iwopy on github.
  2. Create a branch (git checkout -b new_branch)
  3. Commit your changes (git commit -am "your awesome message")
  4. Push to the branch (git push origin new_branch)
  5. Create a pull request here

Support

For trouble shooting and support, please

  • raise an issue here,
  • or start a discussion here,
  • or contact the contributers.

Thanks for your help with improving iwopy!

Metadata

Release files for iwopy 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for iwopy 0.5.0
File Size Uploaded
iwopy-0.5.0.tar.gz 95.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for iwopy 0.5.0
File Interpreter ABI Platform
iwopy-0.5.0-py3-none-any.whl Python 3 none any Details

Total release size: 215.7 kB

Release files / iwopy-0.5.0.tar.gz

Download URL iwopy-0.5.0.tar.gz
Size 95.2 kB
Tags Source
SHA-256 checksum
How to use checksums
142279169cd06400fbc1bea30e8ba93de95a8f2883661dd6b67c1d8542ae266e
BLAKE2b-256 checksum
How to use checksums
470bce8dec15ab76dab5979a07cb67f8cda717c046625850efed7f482804816c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release files / iwopy-0.5.0-py3-none-any.whl

Download URL iwopy-0.5.0-py3-none-any.whl
Size 120.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9f5421a9c6b1df705a7ccd674db27d5ee5132a9907d23b6ae1780f673a6aaa53
BLAKE2b-256 checksum
How to use checksums
2ca27ed5ee1b8418d781ab2f8f29185c4c8c5cdc846faefacc87966d7ecc2adf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.1

2 release files

0.2.3

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2

2 release files

0.1.9

2 release files

0.1.8

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.15

2 release files

0.0.14

2 release files

0.0.9

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page