Python Node Development - Developing multiple nodes

Hello KNIMErs!

Since I started developing my first python nodes I wondered if there is a structure I need to follow when creating my second node?

  1. Can I use the same enviroment?
  2. Should I put the files of my second node into the same enviroment?
  3. Does the “name” in my knime.yml has to be unique?
  4. What do I need to change in the .ini file?
  5. Will the config.yml stay the same or should I start from scratch with the basic.zip like the first time and have 2 config.yml?

Thank you in advance! :slight_smile:

1 Like

Hey there,

moved this into Node Development Category!

As I also started building my first nodes I can share some experience:

  1. Yes you can use the same environment - obviously if you need additional packages you’ll have to install them into the same environment as well
  2. Yes that works as well
  3. I think in knime.yml etc. you are giving your extension a name and not the node - if you add another node to the same extension then there is no need for modifying the name
  4. If you add another node to the same extension you don’t have to change anything
  5. see above…

Overall it helped me a lot to understand how to structure things when I reviewed the github repo for the geospatial extension:

If you check out there geospatial_extension.py:

You see that they keep their nodes in seperate .py files in a nodes folder and then import them:

image

The logic etc. for each node is defined in the different .py files that get imported

2 Likes

Thank you very much @MartinDDDD for sharing the informations and the repository!

1 Like

You’re welcome - hope it helps and good luck with your project!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.