Options here include pybind11. Check stackoverflow q and a on linking pybind11 and OMNET++.
Other option is using omnetpy. Check for GitHub project on omnetpy.
In both cases you need to learn OMNET++ first.
I need to simulate my vanet project that's coded with python. I want to use ns-3 or omnet++, and SUMO.
please help me, I don't know how to link my vanet project with the simulator (ns-3 or OMNET++).
simulation of vanet project with omnet++ and sumo,