fiddle
Fiddle: A Python-first configuration library
What it is and what it does
Fiddle is a configuration library designed to let you express program parameters as Python code rather than external config files or dictionaries. It's built for machine learning workflows where deep configurability—the ability to tweak nested parameters across complex systems—is essential. The library's core idea is that configuration should be readable and maintainable, written in the same language as the rest of your codebase.
You use Fiddle by creating Config objects that represent function or class instantiations, then setting their parameters as Python attributes. This approach keeps your configuration logic explicit and debuggable. The library depends on absl-py for logging, graphviz for visualization, libcst for code manipulation, and typing-extensions for type hints. It's currently in Alpha status but actively maintained by Google, with support for Python 3.8 through 3.10.
Use it for:
- Define hyperparameter configurations for ML experiments in readable Python code instead of YAML or JSON files.
- Build nested parameter hierarchies for complex models where you need to configure sub-components at multiple levels.
- Generate and visualize configuration structures using graphviz to understand parameter dependencies.
- Manage multiple configuration variants for A/B testing or ablation studies without duplicating code.
- Share configuration logic across teams by expressing it as importable Python modules rather than static files.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Fiddle is a Python-first configuration library that lets you define and manage complex program parameters in readable Python code, particularly suited for machine learning applications.
Yes, if you're building machine learning systems or other applications that need deep, readable parameter configuration. The low install friction, active maintenance, permissive license, and zero known vulnerabilities make it a safe choice. The Alpha status is worth noting—expect the API to evolve—but the library is backed by Google and in active use. Install it if configuration-as-code in Python appeals to your workflow; skip it if you prefer external config files or simpler parameter passing.
Install
fiddle on PyPI
pip
pip install fiddleuv
uv add fiddlepoetry
poetry add fiddleInstalling fiddle
Before you install
Low install friction with a pure Python wheel and four lightweight runtime dependencies. Actively maintained with recent commits; last release was in April 2024 and the repository remains active.
License in practice
Licensed under Apache 2.0 (permissive), so you can use, modify, and distribute Fiddle freely in both open-source and commercial projects without restriction.
Quickstart
pip install fiddle
import fiddle as fdl
# Define a configuration object
config = fdl.Config(some_function)
config.param_name = value
Requires Python 3.8 or later.
Verify before relying
- Whether Fiddle's configuration objects integrate with popular ML frameworks (TensorFlow, PyTorch, JAX) or if integration is manual.
- Performance characteristics when managing very large configuration hierarchies.
- Whether the library supports runtime validation or type checking of configured parameters.
Package facts
| License | Apache 2.0 (permissive) |
| Python support | supports the current Python release (>=3.8) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 4 — absl-py, graphviz, libcst, typing-extensions |
| Maintenance | actively maintained — 857 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,562,090/month — #3,759 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: fiddle-0.3.0-py3-none-any.whl
Keywords: fiddle, python, configuration, machine, learning
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
gin-configGin provides a lightweight configuration…
permissive · top 15,000 on PyPI
yacsYACS is a lightweight configuration management…
permissive · top 5,000 on PyPI
ml-collectionsProvides dict-like configuration data…
permissive · top 5,000 on PyPI
netronNetron is a viewer for neural network and…
permissive · top 15,000 on PyPI
prefigureManages run configurations for machine learning…
permissive · top 15,000 on PyPI
ConfigSpaceConfigSpace defines and manipulates…
permissive · top 15,000 on PyPI
tensorflow-addonsTensorFlow Addons provides experimental…
permissive · top 5,000 on PyPI
tensorflowTensorFlow is an open-source machine learning…
permissive · top 5,000 on PyPI
nvidia-cudnn-cu13Provides cuDNN runtime libraries for…
unclear · top 1,000 on PyPI
nvidia-cudnn-cu12Provides cuDNN runtime libraries for…
unclear · top 1,000 on PyPI