pytoolz

toolz: Compose Functional Utilities for Python

Toolz is a lightweight Python library of composable utilities for iterators, functions, and dictionaries. Use it to build data transformations from small reusable operations without adding external dependencies.

View on GitHub Compare
Stars
5.2k
Forks
287
Stars, last 30 days
+3

Our take

Health score

49/100

How it is scored
Activity
48
Community
72
Issues
46
Pull requests
29

+3 stars in the last 30 days

  • Slower to merge pull requests than 95% of the projects we track

Project history

Daily GitHub snapshots since Oct 7, 2026. History covers stars and forks; health signals are not tracked historically.

Selected snapshot

Stars

5,161

Forks

307

Change since Nov 16, 2026: 0 stars·0 forks

Overview

Toolz provides reusable functions for common operations on iterables, functions, and dictionaries. Its composable utilities help Python developers express data-processing tasks as combinations of smaller operations, rather than writing each transformation from scratch.

It is a good fit when you want functional-style building blocks in ordinary Python, especially for iterator-based pipelines. Toolz is pure Python and uses only the standard library; for a Cython-based drop-in alternative, see CyToolz.

Key Features

  • Iterable operations such as groupby, unique, and interpose.
  • Higher-order function utilities including memoize, curry, and compose.
  • Dictionary operations including assoc, update-in, and merge.
  • Curried functions for composing operations, including with Python's map.
  • Utilities designed to interoperate in multi-step processing tasks.
  • Pure Python implementation with no dependencies beyond the standard library.

Use Cases

  • Python developers can build iterator pipelines for transforming or organizing records without introducing a larger data-processing framework.
  • Application code can combine small functions into reusable transformations, such as the word-count pipeline shown in the README.
  • Teams working with nested dictionaries can use the dictionary utilities to create and merge updated structures.
  • Developers who want functional programming patterns in an existing Python codebase can use Toolz without adopting a different language or runtime.

Getting Started

Install from PyPI:

pip install toolz

See the README and documentation for API details and examples.

Alternatives

  • cytoolz: cytoolz implements toolz-compatible iterator, function, and dictionary utilities in Cython for faster execution and Cython interoperability.
ProjectLanguageLicenseStarsStatus
toolzPythonOther5.2kNot checked yet
cytoolzPythonOther1.1kActive

Considerations

  • The README states that Toolz supports Python 3.9+ and is pure Python.
  • The project describes itself as alive but inactive. Maintainers focus on critical bug fixes, Python version updates, and security issues, and do not plan to spend much time reviewing contributions.
  • The project is intended to remain a lightweight utility library, not a large framework. Consider whether its focused set of composable functions matches your needs.
  • The repository metadata reports the license as NOASSERTION; review the repository's license file for the project's stated licensing information.

Found this useful?

Share it with someone who would like toolz.

Comparisons