--- id: cytoolz version: "1.1.0" license: BSD-3-Clause license_treatment: permissive maintenance: aging --- # cytoolz — Cython implementation of Toolz: High performance functional utilities License: permissive · Maintenance: aging · Downloads: 9.1M/mo ## 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 above — 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 pip install cytoolz uv add cytoolz poetry add cytoolz ## Installing 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_current - Install friction: medium - Maintenance: aging - Downloads: 9.1M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags functional programming utilities, high performance itertools, cython accelerated toolz, lazy evaluation iterables, functional data processing, iterator and generator utilities, curry and memoize functions, functional-programming, performance-optimization, cython-compiled [View on SkillFed](https://skillfed.io/packages/cytoolz) · [View on PyPI](https://pypi.org/project/cytoolz/)