spine-tools / Spine-Database-API

Database interface to Spine generic data model
https://www.tools-for-energy-system-modelling.org/
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Pick member entities with get_entity_items #310

Open jkiviluo opened 8 months ago

jkiviluo commented 8 months ago

It would be nice to be able to use the * in this code snippet:

for unit in db.get_entity_items(class_name=unit")
    for unit__to_node in db.get_entity_items(class_name="unit__to_node", byname=("unit", *))
        do things with a unit and all the connected unit__to_nodes