--- id: funcy version: "2.0" license: BSD license_treatment: permissive maintenance: active --- # funcy — A fancy and practical functional tools License: permissive · Maintenance: active · Downloads: 7.2M/mo ## What it is and what it does Funcy is a library of functional programming tools inspired by Clojure and underscore.js, providing utilities for working with collections, composing functions, and abstracting control flow. It includes functions for merging and transforming collections (dicts, sets, lists, tuples, iterators, strings), selecting and filtering elements, manipulating sequences, and creating decorators. The library also offers higher-order function utilities like partial application, currying, and composition, plus control-flow helpers like retry, suppress, and caching. The package targets developers who want functional programming patterns without heavyweight frameworks. It works across Python 3.4+ and PyPy3, with no external dependencies, making it lightweight to integrate into existing projects. The API is designed around practicality—functions preserve collection types where sensible, and common operations have both eager (list-returning) and lazy (iterator-returning) variants. Use it for: - Transform nested data structures (dicts, lists) while preserving types using walk, walk_keys, walk_values - Merge multiple collections of the same type in a single operation - Filter and select subsets of collections using predicates without explicit loops - Compose functions and create partial applications for cleaner, more reusable code - Build decorators for retry logic, error suppression, rate limiting, and caching without boilerplate - Debug data flow by tapping values and logging function calls and durations ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Funcy provides a collection of functional programming utilities—higher-order functions, collection transformations, and control-flow abstractions—designed to make functional patterns practical in Python. Yes. Funcy is stable, actively maintained, has no dependencies, and offers genuine practical value for functional programming patterns in Python. The BSD license is permissive, and the library's age (since 2012) and popularity (top 5000 PyPI packages) demonstrate real-world adoption. Install it if you write functional-style Python or want to reduce boilerplate in collection transformations and function composition. ## Install pip install funcy uv add funcy poetry add funcy ## Installing funcy Before you install: Low friction: pure Python wheel with no runtime dependencies. Actively maintained with a recent commit on 2026-04-19 and stable production status since its first release in 2012-11-18. License in practice: BSD permissive license allows unrestricted use, modification, and distribution in both open-source and commercial projects with minimal obligations. Quickstart: pip install funcy from funcy import walk, merge, select, take, iterate # Transform a dict's values result = walk(str.upper, {'a': 'hello', 'b': 'world'}) # Merge multiple collections merged = merge({'x': 1}, {'y': 2}) # Select items matching a predicate evens = select(lambda x: x % 2 == 0, [1, 2, 3, 4]) Verify before relying: - Whether the package is actively maintained beyond the last commit date (2026-04-19) or if development has stalled - Performance characteristics when working with very large collections or deeply nested structures ## Package facts - License: BSD (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 7.2M/month (top 5,000 on PyPI) - Known vulnerabilities: none known ## Tags functional programming utilities, collection transformation functions, functional composition tools, higher-order functions python, map filter reduce alternatives, functional decorators, sequence manipulation, functional-programming, collection-utilities, decorators [View on SkillFed](https://skillfed.io/packages/funcy) · [View on PyPI](https://pypi.org/project/funcy/)