You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+17-8Lines changed: 17 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,18 +1,22 @@
1
-
**This repo will be archived on December 1st 2021. While still readable it will no longer be maintained.**
2
-
3
-
# go-python3
1
+
# Go bindings for the CPython-3 C-API
4
2
5
3
**Currently supports python-3.7 only.**
6
4
7
-
Golang bindings for the C-API of CPython-3.
8
-
9
5
This package provides a ``go`` package named "python" under which most of the
10
6
``PyXYZ`` functions and macros of the public C-API of CPython have been
11
7
exposed. Theoretically, you should be able use https://docs.python.org/3/c-api
12
8
and know what to type in your ``go`` program.
13
9
10
+
## relation to `DataDog/go-python3`
11
+
12
+
This project is a community maintained successor to [`DataDog/go-python3`](https://github.com/DataDog/go-python3), which will get archived in December 2021.
13
+
14
+
- If you use the Go package `github.com/DataDog/go-python3` in your code, you can use `github.com/go-python/cpy3` as a drop-in replacement. We intend to not introduce breaking changes.
15
+
- If you have unmerged PRs or open issues on `DataDog/go-python3`, please re-submit them here.
14
16
15
-
This project was inspired by https://github.com/sbinet/go-python. Go and take a look if we need something for python-2.7!
17
+
## relation to `sbinet/go-python`
18
+
19
+
This project was inspired by [`sbinet/go-python`](https://github.com/sbinet/go-python) (Go bindings for the CPython-2 C-API).
16
20
17
21
# Install
18
22
@@ -28,7 +32,7 @@ the `PKG_CONFIG_PATH` environment variable.
28
32
29
33
## Go get
30
34
31
-
Then simply `go get github.com/DataDog/go-python3`
35
+
Then simply `go get github.com/go-python/cpy3`
32
36
33
37
# API
34
38
@@ -47,4 +51,9 @@ and error will be set if we failed to open `filename`.
47
51
48
52
If an error is raise before calling th CPython function `int` default to `-1`.
49
53
50
-
Take a look at some [examples](examples)
54
+
Take a look at some [examples](examples) and this [tutorial blogpost](https://poweruser.blog/embedding-python-in-go-338c0399f3d5).
55
+
56
+
# Contributing
57
+
58
+
Contributions are welcome! See [details](CONTRIBUTING.md).
59
+
This project follows the [Go Community Code of Conduct](https://golang.org/conduct).
0 commit comments