Skip to content

Learning PyGX

This section is the conceptual reference for PyGX: what each layer of the library does, and the ideas behind it. For task-oriented walkthroughs, see the Tutorials; for a runnable tour first, start with the bird's-eye view.

Everything here follows from one idea — symbolic object-oriented programming (SOOP): an object retains the arguments it was constructed from, which makes a program something your code can inspect and rewrite, not only execute. Read the Objects page first; the rest of the material assumes it.

Layers

Install

pip install pygx

Requires Python 3.12+. The hot paths run in a native Rust core that is installed automatically; on platforms without a wheel, PyGX falls back to the pure-Python core with identical behavior.

PyGX is a continuation and evolution of the PyGlove project from Google Brain / DeepMind, now developed independently.