{"id":41106121,"url":"https://github.com/aadog/py3-go","last_synced_at":"2026-01-22T15:19:15.811Z","repository":{"id":49308243,"uuid":"516792716","full_name":"aadog/py3-go","owner":"aadog","description":null,"archived":false,"fork":false,"pushed_at":"2022-08-22T11:48:24.000Z","size":8712,"stargazers_count":17,"open_issues_count":2,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-06-21T15:26:39.476Z","etag":null,"topics":["go-py3","go-python","less-cgo","py3","python","python-go","python3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aadog.png","metadata":{"files":{"readme":"README.MD","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-07-22T15:04:39.000Z","updated_at":"2024-03-13T22:51:43.000Z","dependencies_parsed_at":"2022-07-29T01:08:06.398Z","dependency_job_id":null,"html_url":"https://github.com/aadog/py3-go","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/aadog/py3-go","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadog%2Fpy3-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadog%2Fpy3-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadog%2Fpy3-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadog%2Fpy3-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aadog","download_url":"https://codeload.github.com/aadog/py3-go/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aadog%2Fpy3-go/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28665049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-22T14:01:31.714Z","status":"ssl_error","status_checked_at":"2026-01-22T13:59:23.143Z","response_time":144,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["go-py3","go-python","less-cgo","py3","python","python-go","python3"],"created_at":"2026-01-22T15:19:15.670Z","updated_at":"2026-01-22T15:19:15.792Z","avatar_url":"https://github.com/aadog.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n### go python3 bind\n* ```python version:3.10.5```\n* ```python version:3.8.10 (default supper win7)```\n\n### support list\n- `cogo-less,It does not need CGO support, so the compilation speed is very fast`\n- `python3 all plugin,include Native module`\n- `Automatic type conversion Go to PyObject`\n- `Automatic type conversion PyObject to Go`\n- `import Any Python package`\n- `C function is registered to python, painless interaction`\n\n### cgo-less \n\n### install\n\n```\ngo get github.com/aadog/py3-go\n```\n\n\n\n\n### test\n\n```\n\nfunc main(){\n\tPyImport_AppendInittab(\"_test\", func() *PyObject {\n\t\tm := CreateModule(\"_test\", \"aa\")\n\t\tm.AddFunction(\"add\", func(a, b int) int {\n\t\t\treturn a + b\n\t\t})\n\t\treturn m.AsObj()\n\t})\n\tcpy3.Py_SetProgramName(os.Args[0])\n\tcpy3.Py_SetPythonHome(\"./\")\n\tcpy3.Py_Initialize()\n\tcpy3.PyRun_SimpleString(`\n        import _test\n        print(_test.Call('add',1,2))\n    `)\n}\n```\n\n\n### exception\n\n```\n\nfunc main(){\n\tPyImport_AppendInittab(\"_test\", func() *PyObject {\n\t\tm := CreateModule(\"_test\", \"aa\")\n\t\tm.AddFunction(\"add\", func(a, b int) int {\n\t\t    py3.PyErr_SetString(py3.UserException(),\"raise exception\")\n\t\t\treturn a + b\n\t\t})\n\t\treturn m.AsObj()\n\t})\n\tcpy3.Py_SetProgramName(os.Args[0])\n\tcpy3.Py_SetPythonHome(\"./\")\n\tcpy3.Py_Initialize()\n\tcpy3.PyRun_SimpleString(`\n        import _test\n        print(_test.Call('add',1,2))\n    `)\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faadog%2Fpy3-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faadog%2Fpy3-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faadog%2Fpy3-go/lists"}