Registry / data / pydash

pydash

JSON →
library8.0.6pypypi✓ verified 29d ago

Pydash is a Python port of the JavaScript utility library Lo-Dash, providing a comprehensive set of functional programming helpers for collections, objects, strings, and more. It aims to simplify common programming tasks with a functional, declarative style. The current version is 8.0.6, and it follows an infrequent release cadence, often aligning with major Lo-Dash updates or significant Python ecosystem changes.

pip install pydash
INSTALL
IMPORT
SIG · PYDASH
P
pydash
datapythonv8.0.6
Install
1.7s avg
Import
148ms
Disk
17MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.9–3.13
musl
3.9–3.13
Install & Compatibility
Where this runs
tested against v8.0.6 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.10–3.95 runs
installs and imports cleanly · install 0.0s · import 0.150s · 19.1MB
glibc
py 3.10–3.95 runs
installs and imports cleanly · install 1.7s · import 0.146s · 20MB
17MB installed
● package 17MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pydash
✓ import pydash
✗ from pydash.api import functions
Most common functions are directly available via 'import pydash' or 'from pydash import func_name'. The `pydash.api` module is for internal structure rather than direct import.
get
✓ from pydash import get
Functions are typically imported directly from the top-level `pydash` module or accessed via `pydash.<func_name>`.
map_
✓ from pydash import map_
✗ from pydash import map
Many functions conflicting with Python built-ins (like `map`, `filter`, `sum`) were renamed with a trailing underscore (e.g., `map_`) in v8.0.0.

This quickstart demonstrates fetching nested data, filtering collections, and chaining multiple operations in a functional style, which is a core feature of pydash. It uses common functions like `get`, `filter_`, `map_`, and `chain`.

import pydash data = { 'user': 'fred', 'age': 40, 'active': False, 'posts': [ {'title': 'Post 1', 'tags': ['news', 'tech']}, {'title': 'Post 2', 'tags': ['coding', 'python']} ] } # Get a deeply nested value post_tag = pydash.get(data, 'posts[0].tags[1]') print(f"Deeply nested tag: {post_tag}") # Filter a list of dictionaries python_posts = pydash.filter_(data['posts'], lambda x: 'python' in x['tags']) print(f"Posts about Python: {python_posts}") # Chain operations for a more functional style chained_result = pydash.chain(data['posts']) \ .filter_(lambda x: 'python' in x['tags']) \ .map_('title') \ .value() print(f"Chained operation result: {chained_result}")
Debug
Known issues
breakingBreaking change in v8.0.0: Functions that conflict with Python's built-in names (e.g., `map`, `filter`, `sum`, `max`, `min`) were renamed with a trailing underscore (e.g., `map_`, `filter_`).
fix
Update your code to use the underscore-suffixed versions (e.g., `pydash.map_`, `pydash.filter_`). Refer to the v8.0.0 release notes for a complete list of renamed functions.
affects: >=8.0.0
gotchaAliasing `pydash` as `_` (e.g., `import pydash as _`) can lead to conflicts with other Python libraries that commonly use `_` for different purposes, such as `gettext` for internationalization or `collections.Counter` internal alias.
fix
Consider importing `pydash` directly without an alias, or use a less common alias if conflicts arise. E.g., `import pydash` and use `pydash.get(...)` instead of `_.get(...)`.
affects: All versions
gotchaWhile pydash embraces a functional style, not all operations are strictly immutable. Some functions, like `set_` on objects, can modify the object in place, while others return new collections. This can be a source of confusion for users expecting pure functional immutability.
fix
Always check the documentation for specific functions to understand whether they mutate their inputs or return new objects. When in doubt, assume a new object is returned unless explicitly stated as an in-place modification.
affects: All versions
Errors
Common errors & fixes
ModuleNotFoundError: No module named 'pydash'
The pydash library is not installed in the current Python environment.
fix
pip install pydash
AttributeError: module 'pydash' has no attribute 'map'
The user is attempting to call a pydash function that shadows a Python built-in (e.g., `map`, `filter`, `round`, `sum`) directly without its underscore-suffixed version, or incorrectly with the `py_` instance.
fix
Use the underscore-suffixed version of the function (e.g., `pydash.map_`) or use the `py_` instance, which handles these aliases correctly (e.g., `from pydash import py_; py_.map(...)`).
TypeError: 'NoneType' object is not subscriptable
This error occurs when using path-based functions like `pydash.objects.set_` or `pydash.get` where an intermediate key in the specified path resolves to `None` (or another non-subscriptable object), and the function attempts to access further nested keys or elements.
fix
Ensure that the target object and all intermediate path components are valid, mutable containers (like dictionaries or lists) where new keys or indices can be set, or handle potential `None` values explicitly before attempting to access or set nested paths.
NameError: name '_' is not defined
The user is attempting to use the `_` instance for pydash's chained operations or direct function calls without explicitly importing it.
fix
Import the `py_` instance from pydash, typically aliasing it to `_` for convenience: `from pydash import py_ as _`.
Upgrade
Version history
8.0.6latest on PyPI · released Jan 17, 2026
Audit
Dependencies

No dependency data recorded yet.

Agent activity
11 hits · last 30 days
node
8
Resources
pydash — pip install pydash · libregistry