{"repo":"go-python/gopy","free":true,"listed":false,"github":"https://github.com/go-python/gopy","clone":"git clone https://github.com/go-python/gopy.git","description":"gopy generates a CPython extension module from a go package.","language":"Go","stars":2325,"topics":["go","golang","python","python-2","python-3","pypy","cffi","ctypes"],"license":"BSD-3-Clause","category":"dev-tools","readme_excerpt":"gopy ==== gopy generates (and compiles) a CPython extension module from a go package. This is an improved version that works with current versions of Go (e.g., 1.15 -- should work with any future version going forward), and uses unique int64 handles to interface with python, so that no pointers are interchanged, making everything safe for the more recent moving garbage collector. It also supports python modules having any number of Go packages, and generates a separate .py module file for each package, which link into a single common binding library. It has been tested extensively on reproducing complex Go code in large libraries -- most stuff \"just works\". For example, the GoGi GUI library is fully usable from python now (do make; make install in the python directory there, and try the examples/widgets/widgets.py demo). New features: Callback methods from Go into Python now work: you can pass a python function to a Go function that has a function argument, and it will call the python function appropriately. The first embedded struct field (i.e., Go's version of type inheritance) is used to establish a corresponding class inheritance in the Python class wrappers, which then efficiently inherit all the methods, properties, etc. Installation Gopy now assumes that you are working with modules-based builds, and requires a valid go.mod file, and works only with Go versions 1.15 and above. Currently using pybindgen to generate the low-level c-to-python bindings, but support for cff","default_branch":null,"files":null,"tree":[],"storefront":"/r/go-python","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/go-python/gopy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}