Open Source Generative Design Plug-In

Not sure exactly what might work for you. Using a non-python Topo plugins and surrounding those with your components may work too. There is more opensource links at the bottom:

  1. Ameba Topology Optimization Software
  2. Topological Optimization with Millipede
  3. More Millipede
  4. tOpos is a 3D Topology Optimisation for CUDA
  5. Here is a cool study done with RHino 5 and Python

You could contact Arjen, who has a lot of experience with TOpo and Grasshopper Open source: https://github.com/arjendeetman?tab=stars

TopOpt also comes with Open Source and Python 2.7: https://github.com/topopt/TopOpt_in_PETSc

ToOptix is Python using ToOptix Core

Vault Optimizatio with Iron Python and Grasshopper