I’m trying to use a go library from my python project. For that, I need a ctypes equivalent to the arguments types. For example, for a string variable is quite straightforward and there are multiple examples online.
BUT, for a variable of type map[string]string. I couldn’t figure it out. Does anyone has already mapped a map[string]string variable to python ctypes struct?
Compiled as a .so and accessed through ctypes I presume?
A map is quite a complicated type - it is defined in runtime/map.go in the go source.
I don’t think I’d attempt to use it directly from python, I’d write a wrapper in go and expose methods like Keys, Values, Get, Set for a given map which you can call from python.