Skip to main content

A python script package to manipulate MIKE+ database, run simulation by using MIKE+ data, run tools based on MIKE+ data

Project description

logo

MIKE+Py: Streamline your MIKE+ workflows

Python version Full test PyPI version OS Downloads

MIKE+Py is an open-source Python package for interacting with MIKE+ model databases (.sqlite files). It enables automation of modelling tasks, programmatic data manipulation, scenario management, and simulation execution, enhancing the reproducibility and efficiency of MIKE+ workflows.

Installation

MIKE+Py can be installed from PyPI using uv (or pip):

uv pip install mikeplus

Note
Use of MIKE+Py requires a valid MIKE+ license.

To install a version compatible with a specific MIKE+ release year (e.g., MIKE+ 2024):

uv pip install mikeplus==2024.*

Quick Start

Here are a couple of quick examples to get you started:

Open a database and read table data into a Pandas DataFrame:

import mikeplus as mp

with mp.open("your_model.sqlite") as db:
    db.tables.msm_Node.to_dataframe()

Open a database and run the active simulation setup:

import mikeplus as mp

with mp.open("your_model.sqlite") as db:
    db.run() 

Key Features

  • Database Interaction: Programmatically open, create, and manage MIKE+ .sqlite databases.
  • Data Manipulation: Read and modify model data stored in various tables using a fluent API that supports Pandas DataFrames.
  • Scenario Management: Access, create, activate, and delete scenarios and alternatives.
  • Simulation Execution: Run MIKE+ simulations for different modules (CS, EPANET, SWMM) directly from Python.
  • Automation: Automate repetitive tasks such as parameter updates, scenario comparisons, and batch simulations.
  • Tools Integration: Programmatic access to some MIKE+ GUI tools.

Documentation

Comprehensive documentation is available at: https://dhi.github.io/mikepluspy/

Caution: Work with Database Copies

MIKE+Py directly modifies the .sqlite database file. There is no undo functionality within MIKE+Py for changes made to the database.

It is strongly recommended to always work on a copy of your MIKE+ database, not the original, to prevent accidental data loss or corruption.

Compatibility Issues

There are known compatibility issues when using MIKE+Py alongside other DHI libraries (e.g. MIKE IO, MIKE IO 1D, ModelSkill).

  • Importing MIKE IO after MIKE+Py is not supported and will cause errors.
  • Importing MIKE IO 1D before MIKE+Py is not supported and will cause errors.

The following is the suggest import order which works for most use cases, but could still run into issues:

import mikecore
import mikeio
import modelskill as ms
import mikeplus as mp
import mikeio1d

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

mikeplus-2025.6.0-py3-none-any.whl (278.9 kB view details)

Uploaded Python 3

File details

Details for the file mikeplus-2025.6.0-py3-none-any.whl.

File metadata

  • Download URL: mikeplus-2025.6.0-py3-none-any.whl
  • Upload date:
  • Size: 278.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for mikeplus-2025.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 efe783a6ac7ffdbb1e6c593e43eb99528e892687a986593bde2622cc071cfcaa
MD5 259d539743f7679302a9c8fb2c7ac0cd
BLAKE2b-256 fee56b1281890b6130a2d3fcaa158a29ad506acb83a7f017ee6d227fb62331c4

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