pyglove
PyGlove: A library for manipulating Python objects.
What it is and what it does
PyGlove is a library for manipulating Python objects through symbolic programming. It introduces a mutable symbolic object model that lets you define classes with rebindable attributes, iterate over multiple configurations of an object, and search through program variants—all without rewriting the underlying code. This makes it particularly useful for AutoML, evolutionary computing, and any scenario where you need to explore variations of a Python program systematically.
The library is lightweight, depending only on docstring-parser and termcolor. It's been used at scale within Alphabet (Google Research, Google Cloud, YouTube, Waymo) and published at NeurIPS 2020. It provides search primitives, a library of search algorithms, and an API to plug into distributed infrastructure like Open Source Vizier, making it suitable for both small exploratory tasks and large-scale hyperparameter or architecture searches.
Use it for:
- Automated machine learning: define neural architectures as symbolic objects and search over design choices
- Evolutionary computing: iterate and mutate program variants to solve optimization problems like TSP
- ML team collaboration: share and evolve ML code by rebinding symbolic parameters across team members
- Hyperparameter exploration: systematically explore combinations of configuration values in existing Python code
- Domain-specific languages: build custom DSLs by composing symbolic objects with custom binding rules
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
PyGlove provides symbolic object-oriented programming for Python, enabling direct manipulation of Python objects and programs through a mutable symbolic model with built-in search and iteration primitives.
Yes. PyGlove is production-stable, actively maintained, has minimal dependencies, carries a permissive license, and solves a real problem in AutoML and meta-programming. Install it if you need to search over program variants, explore hyperparameters systematically, or build flexible ML code that evolves. The only caveat is verifying Python version support beyond 3.9.
Install
pyglove on PyPI
pip
pip install pygloveuv
uv add pyglovepoetry
poetry add pygloveInstalling pyglove
Before you install
Low friction: pure Python wheel with only two runtime dependencies (docstring-parser and termcolor). Actively maintained with recent commits and production-stable status.
License in practice
Apache License 2.0 (permissive): you can use, modify, and distribute PyGlove freely in commercial and private projects, provided you include the license notice.
Quickstart
pip install pyglove
import pyglove as pg
@pg.symbolize
class Hello:
def __init__(self, subject):
self._greeting = f'Hello, {subject}!'
hello = Hello('World')
hello.rebind(subject='PyGlove')
Verify before relying
- Whether the package works with Python versions beyond 3.9 (classifiers list 3.9 but requires_python is unspecified)
- Performance characteristics when manipulating very large object graphs or search spaces
Package facts
| License | Apache License 2.0 (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — docstring-parser, termcolor |
| Maintenance | actively maintained — 395 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 387,883/month — #7,040 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: pyglove-0.4.5-py3-none-any.whl
Keywords: ai, machine, learning, automl, mutable, symbolic, framework, meta-programming
Tags
More Libraries packages
urllib3 is an HTTP client library that provides…
permissive · top 100 on PyPI
requestsRequests is a Python HTTP library that…
permissive · top 100 on PyPI
pluggyPluggy provides a plugin system that lets you…
permissive · top 100 on PyPI
python-dateutilProvides parsing, arithmetic, and recurrence…
permissive · top 100 on PyPI
sixSix provides utility functions to write Python…
permissive · top 100 on PyPI
pytestpytest is a testing framework that lets you…
permissive · top 100 on PyPI
autogluonAutoGluon automates machine learning model…
permissive · top 15,000 on PyPI
autogluon.coreAutoGluon Core provides the foundational…
permissive · top 15,000 on PyPI
autogluon.multimodalAutoGluon Multimodal automates machine learning…
permissive · top 15,000 on PyPI
autogluon.tabularAutomates machine learning model training and…
permissive · top 15,000 on PyPI
autogluon.timeseriesAutoGluon TimeSeries automates machine learning…
permissive · top 15,000 on PyPI
autogluon.visionAutomated machine learning for image…
permissive · top 15,000 on PyPI
autogluon.textAutomates machine learning for text data,…
permissive · top 15,000 on PyPI
autogluon.featuresAutomates feature engineering and preprocessing…
permissive · top 15,000 on PyPI
pysrPySR searches for symbolic expressions that fit…
permissive · top 15,000 on PyPI