CI Go Reference Go Report Card License: Apache 2.0
gopy is a from-scratch Go reimplementation of the CPython interpreter
core. The goal is 100% behavioural compatibility with upstream CPython
3.14: same data structures, same models, same wire formats, same error
messages. The only thing that changes is the surface API style, which
adopts Go idioms modelled on the Go standard library.
Status: very early. v0.0.x is project scaffolding. The interpreter does not run Python code yet. The roadmap is tracked in the project notes and surfaced through the changelog.
- No alternative semantics. If gopy diverges from CPython, the bug is in gopy.
- No CPython C extension ABI.
.soand.pydmodules are out of scope. Native modules are reimplemented in Go on demand. - No Python 2.
Requires Go 1.26 or newer.
go install github.com/tamnd/gopy/cmd/gopy@latest
Or grab a prebuilt binary from the releases page.
$ gopy --version gopy 0.1.0 (3.14.0+) [go1.26 darwin/arm64] $ gopy --copyright Copyright (c) 2026 The gopy Authors. All Rights Reserved. ...
git clone https://github.com/tamnd/gopy
cd gopy
make build
./bin/gopy --versionCommon developer tasks live in the Makefile:
| Target | What it does |
|---|---|
make build |
Build the gopy binary into ./bin/gopy |
make test |
Run the unit tests with the race detector |
make cover |
Produce coverage.txt and print total coverage |
make vet |
Run go vet |
make lint |
Run golangci-lint (must be installed locally) |
make tidy |
Run go mod tidy |
gopy/
build/ version, platform, compiler, copyright strings
cmd/gopy/ interpreter entry point (mirrors CPython python.c)
changelog/ per-release changelog fragments
.github/ workflows, dependabot, code owners, templates
The runtime packages live at the module root (no internal/) so that
embedders and companion modules can import them directly.
Patches are welcome. Please read CONTRIBUTING.md and the Code of Conduct before opening a pull request.
Security issues should follow the disclosure procedure in SECURITY.md.
gopy is distributed under the Apache License, Version 2.0. See
LICENSE for the full text.
Portions of the design and observable behavior are derived from CPython, which is distributed under the Python Software Foundation License.