skillfed

pyglove

PyGlove: A library for manipulating Python objects.

pyglove v0.4.5 387.9K downloads/30d#7,040 on PyPI719
Permissive license Apache License 2.0 Active released

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 pyglove

uv

uv add pyglove

poetry

poetry add pyglove

Installing 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Science/ResearchLicense :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.9Topic :: Scientific/Engineering :: Artificial IntelligenceTopic :: Scientific/Engineering :: Human Machine InterfacesTopic :: Software Development :: Code GeneratorsTopic :: Software Development :: LibrariesTopic :: Software Development :: Libraries :: Python Modules

Tags

symbolic object manipulation pythonautoml frameworkpython program searchmutable object modelmeta-programming libraryevolutionary algorithm frameworkautomated machine learning
automlsymbolic-programmingmeta-programming

More Libraries packages