see more at: https://github.com/menduo/golang
# golang
Run Go code in Python.
⚠️: WIP
# install
```shell
pip install golang
```
or
```shell
pip install git+ssh://git@github.com/menduo/golang.git
```
# example
## run code
```python
import golang
code = """
package main
import "fmt"
func main(){
fmt.Println("Hello World from github.com/menduo/golang")
}
"""
golang.run_code(code)
```
## run file
```python
import golang
filepath = "~/ws/contrib/golang/golang/testdata/gocode/code1/main.go"
golang.run_file(filepath)
```
Raw data
{
"_id": null,
"home_page": "https://github.com/menduo/golang",
"name": "golang",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "golang,golang",
"author": "menduo",
"author_email": "shimenduo@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/80/ec/9f67006802c4bfb0c9114259f69404e3520ca7b1877a313bf7b4653dbb8f/golang-0.0.3.tar.gz",
"platform": "any",
"description": "see more at: https://github.com/menduo/golang \n\n# golang\n\nRun Go code in Python.\n\n\u26a0\ufe0f: WIP\n\n# install\n\n```shell\npip install golang\n```\n\nor\n\n```shell\npip install git+ssh://git@github.com/menduo/golang.git\n```\n\n# example\n\n## run code\n\n```python\nimport golang\n\ncode = \"\"\"\npackage main\nimport \"fmt\"\n\nfunc main(){\n fmt.Println(\"Hello World from github.com/menduo/golang\")\n}\n\"\"\"\ngolang.run_code(code)\n```\n\n## run file\n\n```python\nimport golang\n\nfilepath = \"~/ws/contrib/golang/golang/testdata/gocode/code1/main.go\"\ngolang.run_file(filepath)\n```\n\n\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "golang",
"version": "0.0.3",
"project_urls": {
"Homepage": "https://github.com/menduo/golang"
},
"split_keywords": [
"golang",
"golang"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "50c52d927b3d3e8de62389160f3922b6e00a08a7886221e793c5ffe5e1459d04",
"md5": "212dcc8c459b52b87f000bbe91ef54df",
"sha256": "1e167f2627144a699263dbeef7e957f39d0c97c2d1ed76fc52e57bbf4b70cce3"
},
"downloads": -1,
"filename": "golang-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "212dcc8c459b52b87f000bbe91ef54df",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 2119,
"upload_time": "2024-03-09T08:13:09",
"upload_time_iso_8601": "2024-03-09T08:13:09.921709Z",
"url": "https://files.pythonhosted.org/packages/50/c5/2d927b3d3e8de62389160f3922b6e00a08a7886221e793c5ffe5e1459d04/golang-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "80ec9f67006802c4bfb0c9114259f69404e3520ca7b1877a313bf7b4653dbb8f",
"md5": "4bca4dd7c993af50564ddc62b3863102",
"sha256": "40e72ee0ac6b25a5e91b6f38daa05a5d2f5741ed2b9098fad8acb2ea0730cdab"
},
"downloads": -1,
"filename": "golang-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "4bca4dd7c993af50564ddc62b3863102",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 2690,
"upload_time": "2024-03-09T08:13:11",
"upload_time_iso_8601": "2024-03-09T08:13:11.760079Z",
"url": "https://files.pythonhosted.org/packages/80/ec/9f67006802c4bfb0c9114259f69404e3520ca7b1877a313bf7b4653dbb8f/golang-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-09 08:13:11",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "menduo",
"github_project": "golang",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "golang"
}