skillfed

funcy

A fancy and practical functional tools

funcy v2.0 7.2M downloads/30d#1,771 on PyPI3,509
Permissive license BSD Active released

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 funcy

uv

uv add funcy

poetry

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 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

Development Status :: 5 - Production/StableIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.4Programming Language :: Python :: 3.5Programming Language :: Python :: 3.6Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9Programming Language :: Python :: Implementation :: CPythonProgramming Language :: Python :: Implementation :: PyPyTopic :: Software Development :: Libraries :: Python Modules

Tags

functional programming utilitiescollection transformation functionsfunctional composition toolshigher-order functions pythonmap filter reduce alternativesfunctional decoratorssequence manipulation
functional-programmingcollection-utilitiesdecorators

More Python Modules packages