github.com/mahmoud/boltons ↗
🔩 Like builtins, but boltons. 250+ constructs, recipes, and snippets which extend (and rely on nothing but) the Python standard library. Nothing like Michael Bolton.
Open this visualization on its own page →
Contributors
64
Lines of Code
1,834
From
2013-02-20
To
2020-11-23
About mahmoud/boltons
Boltons is a collection of over 230 pure-Python utilities designed to complement the standard library with commonly needed functionality that surprisingly remains absent. The project is BSD-licensed, has no external dependencies, and works across Python 3.7 through 3.13 as well as PyPy3. Each module is independent, so developers can either install the whole package or copy individual modules directly into their projects.
The library covers a wide range of practical needs across several domains. File operations include atomic saving to prevent corruption from interrupted writes. Data structure utilities provide an optimized OrderedMultiDict and two types of PriorityQueue. Iteration tools offer chunked and windowed iteration patterns, recursive data structure traversal and merging via the remap function, and exponential backoff with jitter support. Additional modules handle tracebacks, JSON operations, caching, and other common programming tasks.
Boltons intentionally aims for "good enough" implementations suitable for basic use cases rather than competing with specialized third-party libraries for advanced scenarios. The project encourages contributions and provides comprehensive documentation on Read The Docs, with extensive examples and guidance on integration patterns for different project types.