funcy
A fancy and practical functional tools
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 on this page — 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
funcy on PyPI
pip
pip install funcyuv
uv add funcypoetry
poetry add funcyInstalling 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 | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,235 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 7,191,194/month — #1,771 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: funcy-2.0-py2.py3-none-any.whl
Tags
More Python Modules packages
Converts domain names between Unicode and…
permissive · top 100 on PyPI
setuptoolsSetuptools is a Python build backend and…
permissive · top 100 on PyPI
PyYAMLPyYAML parses and emits YAML 1.1 data format,…
permissive · top 100 on PyPI
pydanticPydantic validates Python data structures…
permissive · top 100 on PyPI
annotated-typesProvides reusable metadata objects for use with…
permissive · top 100 on PyPI
typing-inspectionProvides runtime tools to inspect and…
permissive · top 100 on PyPI
jaraco.functoolsProvides additional functional programming…
permissive · top 1,000 on PyPI
pydashPydash provides a collection of functional…
permissive · top 5,000 on PyPI
toolzToolz provides utility functions for…
permissive · top 1,000 on PyPI
consImplements Lisp/Scheme-style cons operations…
unclear · top 5,000 on PyPI
ExpressionExpression provides functional programming…
permissive · top 5,000 on PyPI
lmzProvides convenience functions for mapping,…
copyleft · top 15,000 on PyPI
retry-decoratorProvides a decorator to automatically retry a…
permissive · top 15,000 on PyPI
cytoolzCython-accelerated implementation of the toolz…
permissive · top 5,000 on PyPI
decoratorProvides utilities for writing function…
permissive · top 1,000 on PyPI