cytoolz
Cython implementation of Toolz: High performance functional utilities
What it is and what it does
Cytoolz is a Cython-compiled version of the toolz functional programming library. It provides the same API as toolz—a collection of utilities for working with iterables, functions, and dictionaries in a functional style—but trades compilation complexity for speed. The library is designed to work seamlessly with Python's built-in itertools and functools, and emphasizes low memory usage by returning iterators whenever possible, making it suitable for processing large or infinite data streams.
The main reason to use cytoolz over toolz is performance: typical speedups range from 2–5x for common operations. Since toolz can process very large datasets, this acceleration can be significant in data-heavy workflows. Cytoolz also exposes a C API for projects written in Cython. The package supports Python 3.9 through 3.14 and has experimental support for Python's free-threading mode (3.13+), though thread-safety has not yet been thoroughly tested.
Use it for:
- Accelerate functional data transformations (map, filter, reduce, partition) on large iterables without loading entire datasets into memory.
- Build composable, curried functions for data pipelines where performance matters and you want to avoid intermediate list materialization.
- Process streaming or infinite data sequences using lazy evaluation and iterator-based utilities from a single, familiar API.
- Integrate high-performance functional utilities into Cython projects via cytoolz's exposed C API.
- Replace toolz in performance-critical numerical or data-processing code where the speedup justifies the compiled dependency.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Cython-accelerated implementation of the toolz functional utilities library, providing faster performance for operations on iterables, functions, and dictionaries while maintaining the same API.
Yes, if you are already using toolz and need better performance, or if you are building a data pipeline where functional utilities are central and speed matters. The compiled wheels are widely available, install friction is manageable, and there are no known vulnerabilities. The aging maintenance status (299 days since last release) is not a blocker for a stable, mature library, but monitor the repository for security updates. Not necessary if you are using toolz casually or if raw performance is not a concern.
Install
cytoolz on PyPI
pip
pip install cytoolzuv
uv add cytoolzpoetry
poetry add cytoolzInstalling cytoolz
Before you install
Medium install friction due to compiled Cython wheels, but pre-built binaries are available for common platforms (Python 3.9–3.14, multiple architectures). Last release was 299 days ago; repository is active and not archived, though maintenance status is aging.
License in practice
BSD-3-Clause (permissive) allows commercial and private use with minimal restrictions; attribution and license notice required in distributions.
Quickstart
pip install cytoolz
from cytoolz import partition, compose, curry
@curry
def add(x, y):
return x + y
add_five = add(5)
result = add_five(3)
Requires Python 3.9 or later; C compiler needed if building from source (pre-built wheels available for most platforms).
Verify before relying
- Thread-safety guarantees for free-threaded Python 3.13+ (described as experimental and untested in the description).
- Specific performance benchmarks for the claimed 2–5x speedup across different use cases and data sizes.
Package facts
| License | BSD-3-Clause (permissive) |
| Python support | supports the current Python release (>=3.9) |
| Install friction | medium — platform-specific wheel |
| Runtime dependencies | 1 — toolz |
| Maintenance | aging — 299 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 9,126,805/month — #1,560 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: cytoolz-1.1.0-cp310-cp310-macosx_10_9_universal2.whl; cytoolz-1.1.0-cp310-cp310-macosx_10_9_x86_64.whl; cytoolz-1.1.0-cp310-cp310-macosx_11_0_arm64.whl; cytoolz-1.1.0-cp310-cp310-manylinux1_i686.manylinux_2_28_i686.manylinux_2_5_i686.whl; cytoolz-1.1.0-cp310-cp310-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl; cytoolz-1.1.0-cp310-cp310-manylinux2014_armv7l.manylinux_2_17_armv7l.manylinux_2_31_armv7l.whl; cytoolz-1.1.0-cp310-cp310-manylinux2014_ppc64le.manylinux_2_17_ppc64le.manylinux_2_28_ppc64le.whl; cytoolz-1.1.0-cp310-cp310-manylinux2014_s390x.manylinux_2_17_s390x.manylinux_2_28_s390x.whl; cytoolz-1.1.0-cp310-cp310-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl; cytoolz-1.1.0-cp310-cp310-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_aarch64.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_armv7l.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_i686.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_ppc64le.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_riscv64.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_s390x.whl; cytoolz-1.1.0-cp310-cp310-musllinux_1_2_x86_64.whl; cytoolz-1.1.0-cp310-cp310-win32.whl; cytoolz-1.1.0-cp310-cp310-win_amd64.whl; cytoolz-1.1.0-cp310-cp310-win_arm64.whl
Keywords: functional, utility, itertools, functools, iterator, generator, curry, memoize, lazy, streaming, bigdata, cython, toolz, cytoolz
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
toolzToolz provides utility functions for…
permissive · top 1,000 on PyPI
more-itertoolsProvides additional iterator utilities and…
permissive · top 1,000 on PyPI
jaraco.itertoolsProvides additional iterator utilities and…
permissive · top 15,000 on PyPI
lmzProvides convenience functions for mapping,…
copyleft · top 15,000 on PyPI
flupyFlupy provides a fluent interface for lazy…
permissive · top 5,000 on PyPI
asyncstdlib-fwProvides async-compatible versions of Python…
permissive · top 15,000 on PyPI
jaraco.functoolsProvides additional functional programming…
permissive · top 1,000 on PyPI
funcyFuncy provides a collection of functional…
permissive · top 5,000 on PyPI
asyncstdlibProvides async-compatible versions of Python…
permissive · top 5,000 on PyPI