ewatercycle.models ================== .. py:module:: ewatercycle.models .. autoapi-nested-parse:: Collection of models available in eWaterCycle. .. rubric:: Examples To instantiate a model: >>> from ewatercycle.models import Wflow >>> model = Wflow() # Alternativly import it directly from plugin with >>> from ewaterycecle.plugins.wlow.model import Wflow To list all available models: >>> from ewatercycle.models import sources >>> sources # Returns dictionary containing models To get your own model to be listed here it needs to be registered in the :py:data:`ewatercycle.models` `entry point group `_. Module Contents --------------- .. py:function:: get_package_name(module_name: str) -> str Get the (pip) package name from a module name. Note: falls back to [unknown] if the lookup fails. .. py:data:: pkg_name .. py:class:: ModelSources Bases: :py:obj:`ewatercycle.shared.Sources` Dictionary filled with available models. .. rubric:: Examples Get a nice overview of the available models: >>> from ewatercycle.models import sources >>> print(sources) ... List the names of the available models: >>> from ewatercycle.models import sources >>> sources.keys() ['Wflow', 'LeakyBucket', ...] Access one of the models: >>> from ewatercycle.models import sources >>> sources["Wflow"] model = sources["Wflow"]() To get your own model to be listed here it needs to be registered in the `ewatercycle.models` `entry point group `_ . .. py:data:: sources